[CentOS] cronjob not running

Keith Keller kkeller at wombat.san-francisco.ca.us
Tue Jan 22 18:46:42 UTC 2013


On 2013-01-22, SilverTip257 <silvertip257 at gmail.com> wrote:
>
> If you want it to run every ten minutes use:
> **/10* * * * * curl http://mysite.com/test.php
> for ten minute intervals.

It is not clear where the extra asterisks came from, but the syntax
should be

*/10 * * * * curl ....

Strictly speaking, it is not 10 minute intervals; it is every multiple
of 10.  So if you save your crontab at 7:09, the job will still run at
7:10, not 7:19--it won't figure out the current time and run every ten
minutes from then.  (Nobody here mentioned it, but I've seen it come up
in other contexts.)

>> and i waited for 10 mins to get a message echo to my console. the  message
>> is displayed in my browser when the php script(http://mysite.com/test.php)
>> is loaded via my browser.  The message is also shown on my console when d
>> curl command is run direct from the console.
>>
>> the problem is getting the message from the cronjob.

What message?  If you are hoping to see the curl output, then ...

>> note , i logged in as root user.

...you need to check root's mailbox.  If you haven't checked there yet
you should do so.  If you want to do something else with the output, you
need to specify what that is.

If it's not there, then as the previous poster mentioned check
/var/log/cron.

--keith

-- 
kkeller at wombat.san-francisco.ca.us





More information about the CentOS mailing list