question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

runcrons is once-and-for-all?

See original GitHub issue

The following cron job class is intended to send email every min once running “runcrons” command. But in fact, it only sends out one email every time I run runcrons command (instead of send one email per minute). That defeats the purpose of cron… Am I missing something?

class TestCron(CronJobBase): schedule = Schedule(run_every_mins=1) code = ‘test_cron_philip’

def do(self):
    send_mail('cron test', 'body is test body', 'coach_zhong@163.com',
              ['admin@dessert.webfactional.com'],fail_silently=False)

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
GESTIFANOScommented, Jul 24, 2014

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

1reaction
craiglabenzcommented, May 14, 2018

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What happens if multiple runcrons is executed - Stack Overflow
I have multiple cron jobs written in Django and I'm using package django-cron . If I run the following command multiple times, what...
Read more >
SLES 15 SP3 | Administration Guide - SUSE Documentation
This guide covers system administration tasks like maintaining, monitoring and customizing an initially installed system.
Read more >
595492 – sys-process/cronbase-0.3.7-r1 with ... - Gentoo's Bugzilla
When running under bash 4.4 sys-process/cronbase has a bug that causes the warning: /usr/sbin/run-crons: line 59: warning: command substitution: ignored ...
Read more >
SUSE LINUX
lib/cron/run-crons is run every 15 minutes from the main table (/etc/ ... driver problem once and for all, eliminating the need to install...
Read more >
SUSE Linux Documentation - Wikis on enterpriselab.ch
run-crons is run every 15 minutes from the main table (/etc/crontab). ... once and for all, eliminating the need to install and configure ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found