Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

279
Views
Schedule Django Celery periodic tasks to run from time to other time

How can I accomplish running Django Celery tasks to be running only from Mon to Friday and on those days only from 9am to 5pm EST?

celery.py

from celery.schedule import crontab


app.conf.beat_schedule = {
    'compute-every-5-seconds': {
         'task': 'sum',
         'schedule': crontab(),
     },
  }

What parameters should I add to crontab() that it would run those days and between only those hours?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

celery.py

from celery.schedule import crontab
app.conf.beat_schedule = {
    'compute-every-minute-mon-through-friday-9-to-5': {
         'task': 'sum',
         'schedule': crontab(minute='*/1',
hour='9-17', day_of_week='mon,tue,wed,thu,fri'),
     },
  }

minute='*/1' - runs every minute

hour='9-17' - runs 9am to 5pm

day_of_week='mon,tue,wed,thu,fri' - Monday through Friday

Most of these are available on the documentation page, check it out!

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!