oRxx oRxx - 4 months ago 38
Linux Question

I want to do a Cronjob but I got some Errors

I got some errors in my cron job and I don't know why. In my cron job is this:

enter image description here

and I got those errors when my cron job is trying to start my script but I don't understand

Error: bad username
error because
mc
is a valid user in my system and got the rights for the folder.

Errors:

Apr 2 21:34:55 Debian-78-wheezy-64-minimal /usr/sbin/cron[27104]: (CRON) INFO (pidfile fd = 3)
Apr 2 21:34:55 Debian-78-wheezy-64-minimal /usr/sbin/cron[27105]: (CRON) STARTUP (fork ok)
Apr 2 21:34:55 Debian-78-wheezy-64-minimal cron[27105]: Error: bad username; while reading /etc/crontab
Apr 2 21:34:55 Debian-78-wheezy-64-minimal /usr/sbin/cron[27105]: (*system*) ERROR (Syntax error, this crontab file will be ignored)
Apr 2 21:34:55 Debian-78-wheezy-64-minimal /usr/sbin/cron[27105]: (CRON) INFO (Skipping @reboot jobs -- not system startup)

Answer

You have probably corrupted your crontab file. Edit it with crontab -e and try to add an empty new line at the end.

Comments