Execute actions within drush.
I would like this feature too. This could become very handy for maintenance tasks. I'm willing to help with this feature if a module maintainer would support me with answering questions. ;)
Sounds great! I'd love to help with answering questions.
I think what we need for that is a way to textually input all data types. For most of them, this should be easy but stuff like 'text_formatted' might need some extra treatment.
Seems to me this would be better off in the Rules queue. You could make a rules.drush.inc file, and put your Drush commands there. Then your rules-based commands would be available on any Drupal site with Rules enabled.
See drush topic docs-commands for info on writing your own Drush commands.
drush topic docs-commands
Agreed. Let's add a drush integration that exposes rules actions as drush commands.
In the meantime, Views Bulk Operations (VBO) module has great drush+actions integration. Might solve a few needs
Also, would it be possible to enable/disable rules using a Drush command?
Attached is a patch that implements drush integration for Rules to provide a list, enable, and disable command.
I modeled the patch after the Features module's drush integration. Following that model, one could implement additional commands for operations like exporting and reverting rules.
Cursory review looks good, but haven't tested. Next step, assuming this tests out well, would be to add execute to it for specific components.
Looks good, and tested working.
Shameless cross post: #2089437: Drush integration for executing Rules Scheduler tasks
Drupal is a registered trademark of Dries Buytaert.