I want crontab to execute daily three separate jobs, each corresponding to a python script. The first requires a few minutes to execute, since this sequentially opens a list of urls, extracts the html content and saves some information contained therein. Therefore, I scheduled the three jobs in crontab at different times.
Below my crontab
@daily ID=afstoken kinit --renew SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAILTO="" 0 18 * * 1-5 /usr/bin/python /home/andrea/Documents/script1.py; 10 18 * * 1-5 /usr/bin/python /home/andrea/Documents/script2.py; 12 18 * * 1-5 /usr/bin/python /home/andrea/Documents/script3.py;
Of these, only the first is executed. As you see, I tried inserting an empty line in between instructions and adding the
; at the end of each, but still the second and third jobs are not executed. Each of the three python scripts is executable.
Does anybody know why this is happening?
Could it be because the environment variables
MAILTO are only set in the first job? I can't see how, though, since I thought that setting them at the top of crontab, would set them for all jobs.
Some advice on how to solve this issue would be largely appreciated, since I wanted to add a fourth job to the list. Furthermore, if think there is room for improvement, I would be very happy to learn.