为什么我不能在 12.04 LTS 中重新启动 cron 守护进程?

Pet*_*ite 4 cron upstart

我刚刚更改了服务器上的时区,因此需要重新启动 crond 以便它接收更改,但是当我尝试时,会发生以下情况:

root@s2:/# service cron restart
stop: Unknown job: cron
start: Unknown job: cron
Run Code Online (Sandbox Code Playgroud)

或者

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.
Run Code Online (Sandbox Code Playgroud)

进程列表说:

root@s2:/# ps aux | grep cron
root     10051  0.0  0.1  21992   732 ?        Ss   11:09   0:00 cron
Run Code Online (Sandbox Code Playgroud)

请问我做错了什么?

ks1*_*322 5

请问我做错了什么?

您应该service使用 root 权限运行:

:~$ sudo service cron restart
cron stop/waiting
cron start/running, process 6325
Run Code Online (Sandbox Code Playgroud)