Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bgarrant/fa36eda11d5d279d6143bcf95c41a5b0 to your computer and use it in GitHub Desktop.
Save bgarrant/fa36eda11d5d279d6143bcf95c41a5b0 to your computer and use it in GitHub Desktop.
How to Setup Cron Task to Git Commit Statamic Changes Hourly on cPanel Server

How to Setup Cron Task to Git Commit Statamic Changes Hourly on cPanel Server

  • Login to your cPanel account (http://yourdomain.com/cpanel)
  • Click on Cron Jobs in the Advanced Section
  • If you would like to receive an email notification when a command produces output, please enter your email address under Cron Email at the top of the Cron Job setup page.
  • Under Add New Cron Job, select Once Per hour ( 0 * * * * ) from the Common Settings Drop Menu
  • Under Command: add cd /home/USERNAME/PATH/TO/REPO && git add --all && git commit -m "Automatic Hourly Commit"
  • Click Add New Cron Job button

If you would like do adjust the frequency, select a different option from the Common Settings Drop Menu or adjust the values for Minute, Hour, Day, Month, Weekday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment