Integration of Python schedule library with Django
Add "django_easy_schedule"
to your INSTALLED_APPS
settings like this:
INSTALLED_APPS = (
"django_easy_schedule",
...
)
Create a file named jobs.py
in any installed app, like this:
from schedule import every, repeat
@repeat(every(1).seconds)
def run_job():
try:
## Do your work here
pass
except KeyboardInterrupt:
pass
To run the jobs use the following command
python manage.py jobs run
For more information check the documentation of schedule
package.