I've read this question and the answers links through to Jenkins. Looked into it but was way over my head to install and set up. The other answer links to this page which talks about running cron tasks with drush commands. What I want obviously is the opposite.

With the endgoal in mind of just doing backups and updates, it seemed pretty straightforward the I could create a crontab that triggers a php or sh script with drush commands in it. The only thing I can't seem to find is a way to construct such a script.

I did google this, but I keep getting information to do the opposite thing being trigger cron with drush.

  • 1
    Could you just clarify, are you asking how to set up a crontab? – Clive Feb 11 '13 at 13:08
  • No I know how to set up a crontab. I'm looking for how to make a .php file or maybe even .sh that has a few drush commands that get excecuted when loaded. – Immers Feb 11 '13 at 13:11
  • I'd have to recommend finding a bash scripting/PHP tutorial then, it falls outside of the scope of this site I'm afraid. For example, here's a bash script that makes use of Drush: pages.uoregon.edu/vid/2012/06/17/…. You can use that as a starting block, change what you need to, then invoke it through crontab – Clive Feb 11 '13 at 13:12
  • cool, looking into it. Awesome. – Immers Feb 11 '13 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.