39

I want to be able to accomplish this: http://mywebsite.com/admin/reports/status/run-cron

But it should be done through the Drush interface.

Can any one help me out ?

4 Answers 4

63

You can try drush core-cron

$ drush help core-cron
Run all cron hooks in all active modules for specified site.

Aliases: cron

2
26

You can use drush core-cron or just drush cron

If you wish to use drush to run cron from a crontab, it's best to run cron as the web server user, and supply it with additional arguments to make up the lack of a terminal and supply environment variables.

The drush documentation explains it best either at docs/cron.html or run drush topic docs-cron.

Personally I use server wide site aliases so I omit --root and --uri and use @some.site instead for a single site. If you have defined group aliases, you can run cron on the whole group by using @some.group. More information on site aliases if you are interested, otherwise drush docs-aliases.

1
  • Wish I could double up-vote for pointing me to drush topic docs-cron!
    – Duncanmoo
    Jan 28, 2020 at 11:28
9

You could use drush core-cron command that would run the cron . For more detailing about the commands that drush provides us is there on https://drushcommands.com/

0

You can use --quiet

The --quiet flag will suppress these and other progress messages, again avoiding an unnecessary email message.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.