Back to Cron Helper
Recipephpmagentoecommercecms
Run Magento 2 Cron
Required cron job for Magento 2 e-commerce stores.Magento 2 relies heavily on cron for indexing, emails, currency rate updates, and catalog price rules. This command processes the Magento task queue. It is critical for the proper functioning of any Magento 2 store.
Cron Schedule
Command to Run
Copy and paste this command into your crontab or automation script
cd /path/to/magento && bin/magento cron:runImplementation Examples
Unix/Linux Crontab
* * * * * /path/to/script.sh
Python (with schedule library)
schedule.every(1).minutes.do(job)
Node.js (with node-cron)
cron.schedule('* * * * *', () => {
console.log('Running every minute');
});Go (with robfig/cron)
c.AddFunc("* * * * *", func() { fmt.Println("Run every minute") })GitHub Actions Workflow
- cron: "* * * * *"
Related Cron Recipes
Automate PostgreSQL Backups Daily
databasepostgresbackup
Automate MySQL Backups Daily
databasemysqlbackup
Automate MongoDB Backups Daily
databasemongodbbackup
Automate Redis RDB Snapshots
databaserediscache
PostgreSQL Vacuum Analyze
databasepostgresmaintenance