I have a file which I loaded into crontab with the following jobs, and crontab -l reports the following:
# runs daily at 2:00 am and 2:05 am
30 12 * * * /usr/bin/wget -q -O temp.txt http://<host-url>/cronjob/script1.php 35 12 * * * /usr/bin/wget -q -O temp.txt http://<host-url>/cronjob/script2.php
Cleaner version of Output Above
# runs daily at 2:00 am and 2:05 am
30 12 * * * /usr/bin/wget -q -O temp.txt http://<host-url>/cronjob/script1.php
35 12 * * * /usr/bin/wget -q -O temp.txt http://<host-url>/cronjob/script2.php
I followed the rules as per this site:
I initially had an issue with having both jobs display in the crontab list. I resolved that issue by having all jobs set up on one line as detailed in the section of:
Dealing with Error Messages from Crontab
Once I had both jobs listed correctly, I tested to verify that they executed correctly. At 12:31 I noted that both scripts executed, for script1 and script2 both modify different tables in a mysql database.
Why did this occur? How can I schedule it so that script2 executes at it's own scheduled time?
I realize this is not such a huge issue but I am curious to know.
Thank you for your assistance.