I am running a cronjob every 30 minutes from my shared hosting to another of my ec2 server using the following command:-
0,30 * * * * /usr/bin/lynx http://qwerty.com/crons/myCron.php
The cron job does run every 30 minutes based on the emails I am receiving from the Cron Daemon. But then the PHP file seems to be called sometimes only. I noticed that it's only successful when the HTTP request is sent in the Cron Daemon email I receive.
Examples are shown below:-
Unsuccessful Attempts
Your Terminal type is unknown!
Enter a terminal type: [vt100]
TERMINAL TYPE IS SET TO vt100
(B)0[1;24r[m[?7h[?1h=[H[J[21B[0;7mGetting http://qwerty.com/crons/myCron.php[m
[0;7mLooking up qwerty.com[m[K
[0;7mMaking HTTP connection to qwerty.com[m
[24;1H
[?1l>
Successful Attempts
Your Terminal type is unknown!
Enter a terminal type: [vt100]
TERMINAL TYPE IS SET TO vt100
(B)0[1;24r[m[?7h[?1h=[H[J[21B[0;7mGetting http://qwerty.com/crons/myCron.php[m
[0;7mLooking up qwerty.com[m[K
[0;7mMaking HTTP connection to qwerty.com[m
[0;7mSending HTTP request.[m [22;22H
[0;7mHTTP request sent; waiting for response.[m
[24;1H
[?1l>
How can I make sure that the HTTP request is sent each time the cron daemon runs?