in reply to Long running Perl scripts (on purpose)

  1. Who starts the application and when?
  2. Does the app continue to run if the user logs off?
  3. What about when another user logs on?
  4. Does the user need (or would it be useful for them to), interact with the app on occasion?

For entirely unattended, background operations, start at boot and continue regardless of user, Win32::Daemon is probably the way to go though there is some learning curve involved. You have to understand the modes of operation for windows services and how to control and interact with them. Also, Jan Krynicky's Win32::Daemon::Simple is easier to get started with.

If the user needs to interact with the app, either by querying it or configuring it, or if the app should only run for a specific user, then Win32::SysTray may be a more appropriate way to go.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re: Long running Perl scripts (on purpose)

Replies are listed 'Best First'.
Re^2: Long running Perl scripts (on purpose)
by kansaschuck (Sexton) on Feb 06, 2008 at 04:16 UTC
    I'm looking to run a home monitoring workstation attached to the internet. 1. The home user would start the application or it could start automatically on boot. 2) or it could run on a users personal PC and with that in mind it would need not be affected by the users activities. It would have control devices attached to it. 3) and when others log on it should keep running. It not a user function but a 'house' function. 4. I'd like to see the application have a window, or terminal, or some icon that could be minimized if needed. So you could see status or enter a display command. I do like the idea of having it shutdown, maybe everyday at midnight and have a cron/scheduler job restart it at 12.05.

      Sounds like a combination of a Daemon and a SysTray app that interfaces with it and the user would be the way to go. If you've never written either, then you have a lot of reading to do to get things going.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.