[Solved] cron will not run

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
dietpiOK
Posts: 79
Joined: Thu Mar 16, 2017 9:33 am

[Solved] cron will not run

Post by dietpiOK »

Hi did an almost freh installation of dietpi on my raspi and I just run the update to the latest version.
Unfortunately no cron jobs from /etc/crontab will run.
I checked the service status with "service cron status". In the output I can find the following:

root@v1515:~# service cron status
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2018-06-09 17:23:54 CEST; 5min ago
Docs: man:cron(8)
Main PID: 1548 (cron)
CGroup: /system.slice/cron.service
└─1548 /usr/sbin/cron -f

Jun 09 17:23:54 v1515 systemd[1]: Started Regular background program processing daemon.
Jun 09 17:23:54 v1515 cron[1548]: (CRON) INFO (pidfile fd = 3)
Jun 09 17:23:54 v1515 cron[1548]: Error: bad username; while reading /etc/crontab
Jun 09 17:23:54 v1515 cron[1548]: (*system*) ERROR (Syntax error, this crontab file will be ignored)
Jun 09 17:23:54 v1515 cron[1548]: (CRON) INFO (Skipping @reboot jobs -- not system startup)

So the reason seems to be that the service cannot read the /etc/crontab file. I checked the file and it is like:

root@v1515:~# ls -ls /etc/crontab
4 -rw-r--r-- 1 root root 1461 Jun 9 17:23 /etc/crontab

Any idea how I can fix that issue?
dietpiOK
Posts: 79
Joined: Thu Mar 16, 2017 9:33 am

Re: cron will not run

Post by dietpiOK »

Fixed... There was a typo in the /etc/crontab file :(
MichaelTew
Posts: 13
Joined: Mon Jun 04, 2018 2:21 am
Location: Virgin Islands
Contact:

cron will not run

Post by MichaelTew »

Hello
For some reson cron could not execute sbin/mgrctl -m core problems.autosolve
Run the command manually and show us the result.

If this doesnt help, execute
killall core and then sbin/mgrctl -m core problems.autosolve
Post Reply