Re: cronjob not running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Kunle,

cron does not have the same environment as the user logged in as root.
Specifically, it doesn't have the same 'PATH'. So the safest thing to
do, when you refer to an executable such as 'curl' is provide the full
path to the executable. If you run 'which curl' at the command prompt
it will show the location of 'curl'. Probably it will be
'/usr/bin/curl'. I would suggest that you modify the crontab to have
the full path.

Cheers,

Cliff

On Wed, Jan 23, 2013 at 7:23 AM, Adekoya Adekunle
<adekunleadekoya@xxxxxxxxx> wrote:
> i did this  from the console
>    crontab -e
>
> then i inserted this in my vi editor
>    10 * * * *  curl http://mysite.com/test.php
>
> then i exited vi
>
>
> then i did crontab -l
>   and the cron job was listed
>
> then i did
>
>  /sbin/service crond start
>
> 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 could be wrong ?  could it be that the job is not well setup ?
>
>
> note , i logged in as root user.
>
>
> please help
>
>
> regards
>
> kunle
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux