Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to have a Perl Program constantly running while my PC is on?

If so, how do you do it?

share|improve this question

migrated from stackoverflow.com Sep 11 '11 at 23:59

This question came from our site for professional and enthusiast programmers.

1  
Make it a service or daemon. But the answer will depend on what operating system you are running. Can we assume that pc means windows? –  Doon Sep 11 '11 at 0:15
    
@Doon: I am running Windows (Windows 7). And what do you mean service or daemon. –  Dynamic Sep 11 '11 at 1:02

2 Answers 2

up vote 2 down vote accepted

There are a few options. You can run it as a service as Doon suggested above. If you just want it to run in the background. It sounds like you are running a script from the command line and want to close the prompt/shell, but have it keep running.

Linux: http://www.washington.edu/computing/unix/background.html

I see your follow up that you are on windows, so this existing question may help you out: http://serverfault.com/questions/9038/run-a-bat-file-in-a-scheduled-task-without-a-window

To answer your follow up, a service/daemon is a background process that is always running such as "svchost.exe". If you are on windows, go go run and type "services.msc" - this will bring up the service manager. There are ways to create and manage services from arbitrary programs, but that sounds like its beyond your needs right now.

share|improve this answer

If executing upon login is ok and if Windows is configured to recognize and execute Perl scripts you can try adding (a shortcut to) the script to the Startup folder.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.