I want to create a Trigger or schedule to execute a specific function at 12:01 AM(midnight) in Django.
I expect like :
def job:
print("hello")
// run this function every 12:01 AM on specific interval(start_date,end_date)
I want to create a Trigger or schedule to execute a specific function at 12:01 AM(midnight) in Django.
I expect like :
def job:
print("hello")
// run this function every 12:01 AM on specific interval(start_date,end_date)
I would suggest making that function into a django management command and run it via crontab.
1 0 * * * python /path/to/project/manage.py job