Back to Cron Helper
Recipegitdevopsdeploymentci-cd
Git Auto-Pull (Simple Deploy)
Periodically pull changes from Git (Simple CI/CD).For simple deployments or syncing configuration files, you can use cron to pull changes from a Git repository automatically. Note: Ensure your server has the correct SSH keys set up to authenticate with GitHub/GitLab without a password.
Cron Schedule
Every 5 Minutes
Runs at minutes 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 of every hour.*/5 * * * *Command to Run
Copy and paste this command into your crontab or automation script
cd /var/www/app && git pull origin mainImplementation Examples
Unix/Linux Crontab
*/5 * * * * /path/to/script.sh
Python (with schedule library)
schedule.every(5).minutes.do(job)
Node.js (with node-cron)
cron.schedule('*/5 * * * *', () => {
console.log('Running every 5 minutes');
});Go (with robfig/cron)
c.AddFunc("*/5 * * * *", func() { fmt.Println("Run every 5 mins") })GitHub Actions Workflow
- cron: "*/5 * * * *"
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