Cron Job in Django Admin Interface

Dear Team,

Do you have any package just install and configure in Django admin panel for the schedule for the job of any .py. The same Interface like by default Django provides User and Group, So it’s easy to use any .py make a schedule to daily basis or hourly.

Kindly suggest and I want to run on any server like window or redhat .

Thanks and appreciated if help

We use celery beat for the scheduling and execution of periodic tasks. There are other options, but since we already use Celery for long running tasks initiated by Django, it was the right fit for us.

Thank Sir for the details, let me try how to install and configure. One more thing it is working on the red hat Linux server or not. Do you have any tutorials related to celery beat please provide us the link.

Dear Sir,

I will try to the same install and configured it.
image


Settings.py
Install App: ‘django_celery_beat’,
CELERY_BEAT_SCHEDULER = ‘django_celery_beat.schedulers:DatabaseScheduler’

But how to work created .py scripts or how to add Django URL. Kindly help us to start my project. I stuck on scheduling only. This is my first project in Django. Now need to enable 4 files on scheduling to import data from the oracle database. By manually it is working fine but the same thing needs to schedule a daily basis on every 1 hour.

Request you to please help us to do and make a schedule properly.

I’m not sure I understand what problem you’re having. If you’ve tried something that isn’t working, please post the appropriate code and a description of what’s not working, along with any complete error message you may be receiving.

Dear Sir,

There are option task registered . How to bind the task and how to enable the any Django URL in this task. That is my problem, I am unable to enable the scheduler.

It’s a regular celery task. See the rest of the docs for how to set that up. If you have tried it and it’s not working for you, please post what you’ve tried and any error messages you are receiving in your worker task.

Also, I don’t know what you’re referring to by the “any Django url”. Keep in mind that celery tasks run in a separate process than your main Django task.