Drush integration

Last updated on
30 April 2025

If you use Drush you will be delighted to learn that Subs integrates with Drush and exposes a number of useful commands:


subs-cron

Executes subs cron script. Use this to execute the subs cron script independently from Drupal's cron:

drush subs-cron

Since Subs uses Drupal 7's Job Queue API, this can be useful, for example, if you want to make sure that all subscriptions get processed quickly.

Back to top


subs-load

Load and view a subscription. This can be useful to quickly load and inspect a subscription. It accepts two parameters: the subscription's id and a boolean indicating if you want to load the full entity information (defaults to false):

drush subs-load 15
drush subs-load 15 true

Back to top


subs-delete

Delete a subscription. It accepts one parameter which is the subscription's id:

drush subs-delete 15

Back to top


subs-status

Inform a subscription's status. It accepts one parameter which is the subscription's id:

drush subs-status 15

Back to top


subs-pending

Change a subscription's status to pending It accepts one parameter which is the subscription's id:

drush subs-pending 15

Back to top


subs-active

Change a subscription's status to active. It accepts one parameter which is the subscription's id:

drush subs-active 15

Back to top


subs-grace

Change a subscription's status to grace period. It accepts two parameters: the subscription's id and a boolean indicating whether or not to extend the subscription's end date by the grace period (default behavior):

drush subs-grace 15
drush subs-grace 15 false

Back to top


subs-expire

Change a subscription's status to expired. It accepts one parameter which is the subscription's id:

drush subs-expire 15

Back to top


subs-cancel

Change a subscription's status to cancelled. It accepts one parameter which is the subscription's id:

drush subs-cancel 15

Back to top

Help improve this page

Page status: Not set

You can: