Skip to content

Setting variables on the fly

javan edited this page Aug 12, 2010 · 11 revisions

If you wish to override variables in your schedule.rb file at runtime you can do so using the --set option. This is especially useful for changing your environment when deploying to a staging server or something similar.

Example:

whenever --set environment=staging

You can set more than one variable by forming a query string. Make sure to use quotes.

whenever --set 'environment=staging&cron_log=/my/other/log.txt'

Clone this wiki locally