drush state-setfor drush 8x

Set a state value.

drush state-set

  • Aliases

    state-set has 1 alias/es:

    drush sset

  • Arguments

    state-set accepts 2 argument/s:

    key : The state key, for example "system.cron_last".

    value : The value to assign to the state key. Use '-' to read from STDIN.

  • Options

    state-set accepts 2 option/s:

    --format : Type for  the value. Use "auto" to detect format from value. Other recognized values are string, integer float, or boolean for corresponding primitive type, or json, yaml for complex types.

    --value : The value to assign to the state key (if any).

  • Examples

    Sets a timestamp for last cron run.

    drush state-set system.cron_last 1406682882 --format=integer

    Set a key to a complex value (e.g. array)

    php -r "print json_encode(array('drupal', 'simpletest'));"  | drush state-set --format=json foo.name -

  • Comments

    comments powered by Disqus