4

I just changed the timezone on my server and therefore need to restart crond so that it will pickup the change, but when I try, this is what happens:

root@s2:/# service cron restart
stop: Unknown job: cron
start: Unknown job: cron

or

root@s2:/# /etc/init.d/cron restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service cron restart
initctl: Unknown job: cron

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop cron ; start cron. The restart(8) utility is also available.

The process list says:

root@s2:/# ps aux | grep cron
root     10051  0.0  0.1  21992   732 ?        Ss   11:09   0:00 cron

What am I doing wrong please?

1
  • 1
    Try running "service cron restart" as root, or "sudo" it. I'd love to answer this, but apparently, I can't. 106 !>10 apparently.
    – SEoF
    Sep 14, 2015 at 11:52

3 Answers 3

5

What am I doing wrong please?

You should run service with root permissions:

:~$ sudo service cron restart
cron stop/waiting
cron start/running, process 6325
2

initctl: Unknown job: cron

stop: Unknown job: cron
start: Unknown job: cron

These are indications that something very wicked is going on with cron. You may need to reinstall cron to get everything working again:

sudo apt-get install --reinstall cron
0

You're not doing anything wrong, it's just making a suggestion. Instead of doing that whole deal with .../init.d/...., you can just type:

service cron restart

That's ALL it's trying to tell you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .