0

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)
  • Possible duplicate of [Simple approach to launching background task in Django](https://stackoverflow.com/questions/21945052/simple-approach-to-launching-background-task-in-django) – Cuppyzh Aug 22 '19 at 18:04

1 Answers1

0

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
bitznbytez
  • 74
  • 1
  • 13