I'm trying to run Elysia Cron with Drush. When I use the command drush elysia-cron in the correct folder it runs.

However when I use an alias it doesn't work: drush @main elysia-cron.

The alias works correctly. And after a bit of digging I found the following lines in debug:

{"type":"error","message":"The drush command 'elysia-cron' could not be executed.",

Apparently when I use an alias it loses login permission.

The only user related function for Drush I could find is remote user, but I think that's only for running drush remotely through SSH. How can I give my alias login permission?

1 Answer 1


You could try drush @main --user=1 elysia-cron to force the active user to be the site admin when elysia-cron runs; however, all of the cron methods should be API calls, and therefore should not care who the active user is. Note also that the error message that you quote above simply means that part of the Drupal bootstrap is failing for you; this is not a permissions issue (because Drush does not need permission to log on as a user -- it just does it), but is indicative of some other problem.

Run drush status with your cwd set to your site, and run it again vi drush @main status from a different working directory, and compare the output, esp. vis-a-vis the Site URI line. Also run in --debug mode both times, and look for any other differences in the output. If you have set root and uri in your alias, it pretty much should run the same both ways.

  • Cheers for the knowledge! I changed tactics and realized my problem with Elysia Cron. Looks like it can only be run every hour unlike the standard Drupal cron and that'd thrown me off. Commented Dec 3, 2013 at 12:35

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.