The whenever cookbook default receipe includes the 'install' recipe to:
- install the 'whenever' gem and its dependencies
The whenever cookbook will include the 'wheneverize' recipe IF node attributes include:
{
"whenever": {
"update_tasks": true
}
}
The wheneverize recipe:
- creates a default
schedule.rb
file including tasks specified in 'whenever' chef attributes, and, - runs
whenever --update-crontab
e.g.
Just include whenever::wheneverize
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[whenever::wheneverize]"
]
}
Include whenever
attributes in your node's chef attributes:
"whenever": {
"gem_version": "0.8.4",
"whenever_path": "/mnt/mfs-medidata-distro/current",
"update_tasks": true,
"whenever_tasks": [{
"unit_of_time": "1.minutes",
"task": "command \"echo \'hello\'\""
}]
}
Learn more about whenever.
- add configurability to schedule.rb as provided by whenever gem
Authors: Aimee Barciauskas abarciauskas@mdsol.com