Hello All,
I have been trying to schedule a task using cron only to realise that it is not working.
Code:
$ ps -ef | grep cron
root 2964 1 0 Nov12 ? 00:00:00 crond
root 2178 2964 0 14:20 ? 00:00:00 crond
seyiisq 2228 20774 0 14:20 pts/0 00:00:00 grep cron
$ crontab -l
* * * * * /usr/bin/date >> /xyz/cron_work.log
$
I have checked the file cron_work.log but it was empty.
Please any advise
However, when i queried the log in /var/log i got
Code:
# tail -10 /var/log/cron
Dec 29 14:29:01 computername crond[3215]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)
Dec 29 14:30:01 computername crond[3258]: (root) CMD (/usr/lib/sa/sa1 1 1)
Dec 29 14:30:01 computername crond[3260]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)
Dec 29 14:31:01 computername crond[3311]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)
Dec 29 14:32:01 computername crond[3371]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)
Dec 29 14:33:01 computername crond[3431]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)
Dec 29 14:34:01 computername crond[3473]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)
Dec 29 14:35:01 computername crond[3513]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)
Dec 29 14:36:01 computername crond[3570]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)
Dec 29 14:37:01 computername crond[3631]: (seyiisq) CMD (/usr/bin/date >> /xyz/cron_work.log)