in reply to Using Trigger Files

Since you can use cron, how about just telling cron to execute the script every 10 minutes? this would prevent you from having to keep tabs on it if for whatever reason it hangs/dies. I don't know what sort of control you have with the server, but if it's ever down for maintenance, you are going to have to restart your script. cron will come up with the box and every 10 minutes your job will run. If anything you gain the peace of mind knowing that your script even if it dies a horrible death, with just start back up again without your intervention. (covers you on weekends, vacations, pub crawls... :-)

is the requirement to execute every 10 minutes, or is it to act on lets say a new file appearing on the system (about every 10 minutes)? if you need to act immediately then I suppose cron may not be the best tool, then again you could alway increase the frequency of the cron job.

Seems a good candidate for cron, plus you don't have to code a quasi-scheduler yourself (leverage others hard work).

good luck with whatever you decide!

Replies are listed 'Best First'.
Re: Re: Using Trigger Files
by azatoth (Curate) on Jun 14, 2001 at 17:47 UTC
    Bah! Can't edit Parent Node.

    This is what I meant by using the cron. I could easily put in a line to run my script every ten minutes (which would check for files every 10 minutes), but I was just wondering if there was an easy way to do "triggers".

    Although the more I think about it, the more sense it makes to run it as a cronjob, mainly due to your point about dying / restarting.

    Just a whimsical query more than anything...Thanks for the useful replies & insights as always...

    Azatoth a.k.a Captain Whiplash

    Make Your Die Messages Full of Wisdom!
    Get YOUR PerlMonks Stagename here!
    Want to speak like a Londoner?