linux - My Cron is not running -
i have list of cronjob set run in regular schedule. after read , tried suggestion here:
https://stackoverflow.com/a/22744360/1478789
i still haven't able figure out why cron job not running.
when tried simple command:
* * * * * /bin/echo "cron works" >> /home/user/somefile.log
it not append text intended file.
so, try "manually" executing following command:
user@machine:~$ echo "random text" >> /home/user/somefile.log
it appends text file.
lastly, when issue following command:
user@machine:~$ grep cron /var/log/syslog
it doesn't print @ all
by way, edit cron
user@machine:~$ sudo editor=nano crontab -e
if, use this:
user@machine:~$ editor=nano crontab -e (without sudo)
i following message:
no crontab user - using empty 1 error reading /home/user/.nano_history: permission denied press enter continue starting nano
can troubleshoot this, thanks.
is cron running?
$ps ax | grep cron 1236 ? ss 0:00 cron
if not check,
$ sudo /etc/init.d/cron.status cron start/running, process 1236
if yours isnt running it'll like: cron stop/waiting
try starting with
$sudo /etc/init.d/cron start
-- hth
keith
edit: bad see cron running after re-reading post ... hmmm further remember having similar problem few months ago running ubuntu 14.04 on laptop. sorry...
Comments
Post a Comment