How to add / configure custom cron jobs for your MDOQ production instance.
To add a custom cronjob:
- Select your production instance
- Select "Settings" and navigate to "Cron"
- Click the "+"
- Select the user you wish to run the command as. We strongly recommend using the magento user, but the option is there should you need to use the root user.
- Enter a valid crontab expression.
- Enter the command you wish to run, for example
cd /home/magento/htdocs; php bin/magento my:custom:command
Or if you which to record the output
cd /home/magento/htdocs; php bin/magento cron:run >> var/log/cron.log 2>&1
- Click "Save"
- Then select "Sync"
- Select "Show More"
- Check the "Cron" component
- Click "Proceed"
Once the synchronization completes, your new cron job will be in place.
Related Articles