Should linux cron jobs be specified with the & character to indicate running in the background?

In the crontab file, should commands with the ending "&" be indicated or will the command be executed in the background?

I have:

*/20 * * * * /home/me/monitor/check.sh /home/me/monitor/check.properties >> /home/me/monitor/check.log 2>&1 & 

I have seen conflicting answers to this question in different places. Some say that you don’t need to put &, others that without the cron ampersand wait for the command to exit, even if all output is redirected.

Thanks Paul

+43
linux cron crontab
May 08 '12 at 17:26
source share
1 answer

Each cron job runs automatically in the background, so there’s no need for &

See this one .

+58
May 08 '12 at 17:27
source share



All Articles