Priority: Low
Request: How do I run cron job like processes on crowdbotics? I have django management command that has to be executed on every week.
Project ID: 20027
Project Link: https://app.crowdbotics.com/dashboard/app/20027
we can use Heroku Scheduler for this, let me know the management command and i will add it.
It’s not yet implemented, will I be able to register Heroku Scheduler or I should come back with this request ?
Mention me here after you need it done. Heroku Scheduler has to be added from heroku app dashboard itself.
@saurav can you please create a scheduler every Wednesday midnight for the following management command:
python manage.py generate_meal_plan
@radac I have added a scheduler to run at 12:00 am every Thursday. Let me know if there is any issue with it.
@saurav do we have any output from the previous execution? I did not found any error / meal plans to be generated.
Can you please schedule for today/anytime to have another test?
@radac Since it’s scheduler to run every thursday 12:00 am, it hasn’t run yet. I ran this command manually, see if it generated plans. The management command didn’t give any error or output though. I believe, management command some output to console about the process status or steps.
@saurav I’m not able to see any updates. In meantime I have added output for management command so it should print it’s result. Can you please run again?
@radac I ran the management command and this is the output. Successfully generated 3 meal plans with 0 errors
. I guess it should be generated now.
Alright, everything is OK. Can you please set scheduler to Wednesday midnight and we are all set.
Thank you very much for your support!
Can you please check the scheduler?
I was not able to see any updates in the database.
Console output above seems OK, is this connecting to same database?
I can’t figure out, on my local machines it does the job.
Hi @radac, the scheduler ran successfully, see attached. It does indeed connect to the same database.