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 ?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI 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 ?
You can try drush core-cron
$ drush help core-cron
Run all cron hooks in all active modules for specified site.
Aliases: cron
hook_cron()
implementations, so system_cron()
will be called. It is equivalent to running from from the admin UI or /cron.php
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
.
drush topic docs-cron
!
Jan 28, 2020 at 11:28
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/
You can use --quiet
The --quiet
flag will suppress these and other progress messages, again avoiding an unnecessary email message.