Answer the question
In order to leave comments, you need to log in
Cron has stopped working on the server, what could be the problem?
Good afternoon, cron stopped running jobs completely. I decided to try to create a new file and register everything. Got this file
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin/
# m h dom mon dow user command
* * * * * root touch /root/home/1.txt
#
Answer the question
In order to leave comments, you need to log in
Apparently the service is not running.
what does service cron status
say?
/etc/init.d/cron status
says what?
If ubuntu/debian then:
sudo systemctl enable cron
to always start the service.
And run it manually:
service cron start
/etc/init.d/cron start
If you have older versions, then there may not be cron, but crond
At the end of the file, add at least 2 empty lines - this is not a bug, this is a feature.
If there are not 2 empty lines at the end of the file, then the file will not be executed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question