I have a Rails app deployed on Heroku with the Heroku scheduler add-on successfully working for daily jobs.
Now I want a weekly job, but the schedul
As discussed over here, and using the above logic from Rob, here are the bash scripts broken down by a day of the week, once a month, and on a specific date.
Run a task every Monday:
if [ "$(date +%u)" = 1 ]; then MY_COMMAND; fi
Run a task every 1st day in a month:
if [ "$(date +%d)" = 01 ]; then MY_COMMAND; fi
You could also run a job every year on December 24th:
if [ "$(date +%m)" = 12 ] && [ "$(date +%d)" = 24 ]; then MY_COMMAND; fi