• Reset your password
Home
OO PHP, Drupal, Symfony Developer and Architect
Tim Rabbetts

Main navigation

  • Home
  • Blog
  • Log in

Run drush cron inside docker

Breadcrumb

  • Home
  • blog
  • run drush cron inside docker
  • Run drush cron inside docker
Tim
Rabbetts
By zarexogre | Sat, 23/05/2020
business, cargo containers, crate
drupal
drush
cron

One way I have found to run drush hourly in cron is by adding an entry like this to the hosts crontab.

0 * * * * cd /my/folder/with/docker/compose/file/in/it && /usr/local/bin/docker-compose exec -T my_docker_name_php sh -c "cd drupal/web && drush cron"

This will execute the drush cron command from within the container every hour.