URGENT - Cron job / heroku scheduler does not work properly

Hello,

We have following project id 20027, which should run a management command every Wednesday midnight.
Currently does not run correctly, it’s executing the job every day. Please update scheduler to execute only Wednesday midnight.

Here is the command:
python manage.py generate_meal_plan

Hello @radac, thanks for writing in.

The only three interval types that Heroku Scheduler is capable of scheduling tasks for are:

  • every 10 minutes
  • every hour
  • every day

If you need to run your commands only on specific days, it’s safer to detect the day and time when the command is running as part of your command.

There is however a command-line alternative, such as if [ "$(date +%u)" = 3 ]; then python manage.py generate_meal_plan; fi that we can use. But this doesn’t take into account your app’s target time zone, and doesn’t support other more advanced fail checks you might want to implement.

Alright, I will update the app and do day check on the management command.

@dmitrii.k I have tried to deploy and I do not have any logs to debug. I did not get the success message either.

Project ID 20027

@radac, as discussed via DM, your project was re-synchronised and everything worked.

Happy Coding!