Unable to create a new Scheduled Cron Jobs on Virtualmin - Please help

SYSTEM INFORMATION
OS type and version: Ubuntu 18.04 LTS
Webmin version: 1.984
Virtualmin version: 6.17-3
Related products version: DigitalOcean Droplet (Ubuntu 18.04 LTS)

Hello.

Unable to run a CronJob in Webmin when I try to create a new CronJob with the command * * * * * /usr/sbin/php-fpm7.4 /home/mydomain/domains/erp.mydomain.com/public_html/artisan schedule:run >> /dev/null 2>&1, I get an error return:

Error

### Failed to save cron job : An error was detected in the new Cron configuration :

no crontab for host - using an empty one crontab: installing new crontab "/tmp/crontab.zNNmLh/crontab":0: bad command errors in crontab file, can't install. Do you want to retry the same edit? (y/n) crontab: edits left in /tmp/crontab.zNNmLh/crontab

@hourly * * * * * /usr/sbin/php-fpm7.4 /home/mydomain/domains/erp.mydomain.com/public_html/artisan schedule:run >> /dev/null 2>&1

So, how to successfully create a Cron Task without having such an error ???
Thank you.

Hmm…how’d you get both @hourly and * * * * * in there? It should be one or the other, not both. I’m surprised Webmin let it happen. Can you show us what the input form looks like for this job?

So where did we misconfigured that we couldn’t create this new cron job ???

Exactly where I said you did. The schedule is specified in the UI, you can’t also include it in the Command field.

Get rid of the * * * * *. The schedule is defined in the When to execute section.

It works. Thanks

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.