in reply to Re: Cron or running process?
in thread Cron or running process?
I'd go for cron, keeping in mind that:
- It could hang and not work (though the same could be for your own code, and I guess that would be more likely than cron itself)
- More than one instance of your script could be running at the same time. Play it safe and check before doing things that will break if done by two different process at once. Having a database backend with transactions might help.
- Log, log and log again. You want to know whether your thing ran, whether it completed okay, what went wrong. Log it before, don't wonder what went wrong afterwards.
In Section
Seekers of Perl Wisdom