# yet another crontab question - what about program that takes long time?



## ivand58 (Jul 30, 2011)

Hi

I am going to run one heavy program that works about 3 hours from crontab. But I am not sure how exactly to run it - with regular call or like a daemon (with "&" at the and of the line)?


----------



## da1 (Jul 30, 2011)

Does it make any difference to the program itself ?


----------



## ivand58 (Jul 30, 2011)

No, as far i know, but if the crontab waits my program to finish then it will wait 3 hours ...


----------



## kpa (Jul 30, 2011)

Does that really matter? Cron does wait for the program to finish but it doesn't have any effect on its ability to start other cron jobs while the one job that is taking a long time to finish is running.


----------



## fwaggle (Jul 31, 2011)

Just make sure the program (or a script wrapped around it) is smart enough to keep it from running multiple times. Otherwise if cron runs it again before it's finished you could end up taking the whole box down.

(I don't think cron keeps track of that, I could be wrong though)


----------

