0

Currently, I'm using a Django library named appscheduler.

First code:

job = scheduler.add_job(schedule_job, 'cron', day_of_week='mon-fri', hour=14, minute=5)

When I run this cron job in my localhost it's working very smoothly. But my Cpanel hosting not working. But in my Cpanel terminal if I run this code "python manage.py runserver" it is working until the terminal is open. When I close the terminal, it's not working. The server opened into the terminal. enter image description here

Another thing is that,

Second code:

job = scheduler.add_job(schedule_job, 'interval', seconds=50)

This interval job is running fine into localhost and also cpnael (N.B without running terminal it's working smoothly into Cpanel)

I couldn't detect here why the first code is not working without Cpanel and why the second code is working fine without terminal.

Prosenjit
  • 241
  • 5
  • 15

0 Answers0