How can I specify start and end of the job?
example execute every 5 minutes start at 5am and end at 10pm. Is this possible in whenever?
How can I specify start and end of the job?
example execute every 5 minutes start at 5am and end at 10pm. Is this possible in whenever?
The Cron syntax for this would be
*/5 5-22 * * * sh ./script.sh
Explanation
*/5 5-22 * * * sh ./script.sh
\ \ \ \ \_every week day
\ \ \ \__every month
\ \ \___every day
\ \_______every hour between 0500 (5 AM) and 2200 (10 PM)
\__________every 5 minutes
Here's how to do it in whenever
# schedule.rb
every '*/5 5-22 * * *' do
command "echo 'crontab syntax is useful'"
end