Open slalit360 opened 3 years ago
django-crontab
# crontab job for mail alerts CRONJOBS_LOG_DIR = r"/var/log/celery3" CRONJOBS_ERR_LOG = "cronjob_beat.log" CRONTAB_COMMAND_SUFFIX = '2>&1'
CRONJOBS = [ ('/60 ', 'integrations.notification_util.trigger_updates_inbox', '>> {} 2>&1'.format(os.path.join(CRONJOBS_LOG_DIR, CRONJOBS_ERR_LOG))), ('/30 ', 'integrations.notification_util.trigger_updates_proc', '>> {} 2>&1'.format(os.path.join(CRONJOBS_LOG_DIR, CRONJOBS_ERR_LOG)), ]
#### Details * Output of `crontab -l` after running `python manage.py crontab add`.
Then both jobs will be added .
* Output of `crontab -l` after running `python manage.py crontab remove`.
Then both jobs will be removed.
* If this output contained a `crontab run` command and I copy this command to my terminal the job works: yes/no
CRONJOBS in settings is a list. All elements in the list will get added to cron. If you do not want to add a job, then you will have to remove it from the list.
CRONJOBS
settings
Environment & Versions
Settings
django-crontab
settings:CRONJOBS = [ ('/60 ', 'integrations.notification_util.trigger_updates_inbox', '>> {} 2>&1'.format(os.path.join(CRONJOBS_LOG_DIR, CRONJOBS_ERR_LOG))), ('/30 ', 'integrations.notification_util.trigger_updates_proc', '>> {} 2>&1'.format(os.path.join(CRONJOBS_LOG_DIR, CRONJOBS_ERR_LOG)), ]
Then both jobs will be added .
Then both jobs will be removed.