Giter Club home page Giter Club logo

Comments (7)

GESTIFANOS avatar GESTIFANOS commented on July 30, 2024 2

This is like creating cron job on top of another cron job.

from django-cron.

craiglabenz avatar craiglabenz commented on July 30, 2024 1

@shivamsinghal212 The idea is that your window task scheduler will invoke python manage.py runcrons very regularly -- say, every minute, or every 5 minutes. django-cron then internally maintains the schedule of your jobs, launching each as necessary. This allows you to easily keep said schedules inside your application code and thus inside version control.

from django-cron.

dfryta avatar dfryta commented on July 30, 2024

Yes, you miss something ("runcrons" is not background deamon). From documentation:

"Now everytime you run the management command python manage.py runcrons all the crons will run if required. Depending on the application the management command can be called from the Unix crontab as often as required. Every 5 minutes usually works for most of my applications."

That means you have to put "runcrons" command in your crontab.

Example:

You have some CronJob that do something every 30 min.

To get this running you must edit you crontab (linux, mac) or task scheduler (windows) to run "python manage.py runcrons" for every, let say 1 min.

If you get this running, your CronJob will be pinged every 1 min and run if necessary (every 30 min or whatever value you have set).

Hope this helps.

from django-cron.

hunanboy avatar hunanboy commented on July 30, 2024

Thanks I notice you have answered my question on SO as well:) Let's move over there. It might benefit more people. And may I suggest you add this answer to project wiki? It clarify things for newbies like me. I once thought the purpose of your app is to by-pass crontab entirely.

from django-cron.

DanielStevenLewis avatar DanielStevenLewis commented on July 30, 2024

I also experienced this issue until finding this ticket. Documentation could use further clarification. "everytime you run the management command python manage.py runcrons all the crons will run if required." indicates to me that manage.py runcrons starts a recurring cron job

from django-cron.

craiglabenz avatar craiglabenz commented on July 30, 2024

Link to the SO question, for posterity?

from django-cron.

shivamsinghal212 avatar shivamsinghal212 commented on July 30, 2024

I don't understand the point of setting schedule in django-cron, If we are setting it using the windows task scheduler.

from django-cron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.