openflighthpc / flight-control

0 stars 0 forks source link

Include specified rails environment when generating cron jobs with whenever #52

Closed timalces closed 1 year ago

timalces commented 2 years ago

Updates logic in how cron jobs are generated as part of the whenever workflow, to include the specified RAILS_ENV.

For example, running:

RAILS_ENV=production whenever -w will update the crontab with all scheduled tasks including RAILS_ENV=production RAILS_ENV=staging whenever -w will update the crontab with all scheduled tasks including RAILS_ENV=staging

The same applies when running whenever without -w, which will show generated cron jobs, but not update the crontab.

If no RAILS_ENV value is set, this will default to development.

timalces commented 1 year ago

Merging, as appears to be working as expected.