php - Crontab Linux not running at specific time -


i have crontab job running @ 07.00 every day. set

0 7 * * * /usr/bin/curl http://localhost//blablaba 

it did not work

but if replace with

    */10 * * * * /usr/bin/curl http://localhost//blablaba 

then running every 10 minutes. not working if give specific time

for information, have check server time , shows right time

thanks :(

your cron expression looks correct. follows format:

minute hour day-of-month month day-of-week [user] command   0     7       *          *       *              /usr/bin/curl http://localhost//blablaba 

ps: need add user field if using /etc/crontab file , not user specific crontab.

so, if cron job defined in /etc/crontab file, need add user field cron job make run. if it's not case, check url on client , server side.

but, think best thing debugging cron job. so, need enable logging cron jobs doing following:

if on ubuntu:

sudo vi /etc/rsyslog.d/50-default.conf 

if on centos:

sudo vi /etc/rsyslog.conf 

uncomment line if commented:

#cron.*                         /var/log/cron.log 

then restart rsyslog , cron:

sudo service rsyslog restart sudo service cron restart or sudo service crond restart 

now can check /var/log/cron.log file log messages , see if there problems.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -