11-27-2006
16,
0
Join Date: Nov 2006
Last Activity: 25 March 2018, 1:49 PM EDT
Location: Lehi, Utah, USA
Posts: 16
Thanks Given: 2
Thanked 0 Times in 0 Posts
The first line works because it's running every minute of every day and the program being called accepts passed parameters that control what actually happens when. When I write programs that have the capability of checking date/time for acting on whatever, I usually have it do something very different from the schedule cron runs, ie:
If a program runs every Monday morning, but only if there's data to collect and act on, then Cron runs every Monday morning and the program checks for the data being present. Actually that example is a no-brainer.... It's Monday and I don't drink coffee. But, I hope that gives some semblance of understanding.
The above example, poor as it is, should also apply to your second line.
Oh, I just noticed the '&' at the end of the lines. If the called programs run once and then die, cron needs to be set to run often. If they run forever, then cron doesn't need to be run so often. In that case, the called programs should have a PID file in /var/run to check against. If the file is there and the PID is active, then the program isn't run, else it is run.
HTH,