Cron Jobs / Crontab - Cannot Create or Edit File


New Member
Oct 6, 2020
Reaction score
I try to edit the crontab file to create con jobs by using ssh "sudo crontab -e" and "crontab -e", but I keep getting the following error message (or as shown in the image below):

no crontab for root - using an empty one
crontab: installing new crontab
"/tmp/crontab.C7Hy04/crontab":22: bad minute
errors in crontab file, can't install.


And the file path location "/var/spool/cron/crontabs/" folder is empty. Shouldn't there be a cron file of some type to edit?

So what I'm trying to do is create cron jobs to handle my Mautic cron tasks/jobs as shown below:

php /var/www/ mautic:segments:update
php /var/www/ mautic:campaigns:update
php /var/www/ mautic:campaigns:trigger
php /var/www/ mautic:iplookup:download
php /var/www/ mautic:broadcasts:send
php /var/www/ mautic:maintenance:cleanup --days-old=60 --no-interaction

Do I need to somehow reinstall the crontab setup or how do I get back to being able to edit with nano? At this point I'm not able to edit the main crontab file & nor do I know where it is located.

Thanks for any support.

When you do crontab -e the following location gets edited: /var/spool/cron/$USER. If the format is wrong crontab will notify you and ask you if you want to edit cront to correct the mistake. The format it wants looks like this:
# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
Last edited:

Staff online

Members online

Latest posts