Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Setup django-crontab #5410

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

[WIP]Setup django-crontab #5410

wants to merge 4 commits into from

Conversation

pkfec
Copy link
Contributor

@pkfec pkfec commented Sep 14, 2022

Setup and run cron job:

  • checkout feature branch: git checkout setup-django-cron-job
  • activate python virtual env: pyenv virtualenv 3.9.13 venv-cron
  • install requirements: pip install -r requirements.txt
  • install and build node dependencies: npm i & npm run build
  • migrate database: cd fec and ./manage.py migrate
  • add scheduler job: python manage.py crontab add (cron job is set to run every 20 minutes for testing purpose)
  • verify cron job is up: python manage.py crontab show
  • remove cron job: python manage.py crontab remove
  • By default log is created inside var/mail folder. log name is
    for example: log file on my mac is /var/mail/pkasireddy. open pkasireddy log file in vscode or any other editor

Other helpful commands:


- To edit crontab in a editor (vim, Terminal etc...): `crontab -e` 

- To list all scheduled cron jobs running for the current user: `crontab -l`

Todo#
Working on getting the logs write to a file (scheduler.log)

@codecov-commenter
Copy link

Codecov Report

Merging #5410 (f93bed3) into develop (92f6fdd) will decrease coverage by 0.07%.
The diff coverage is 11.11%.

@@             Coverage Diff             @@
##           develop    #5410      +/-   ##
===========================================
- Coverage    75.07%   75.00%   -0.08%     
===========================================
  Files          125      126       +1     
  Lines         8132     8141       +9     
  Branches       648      648              
===========================================
+ Hits          6105     6106       +1     
- Misses        2027     2035       +8     
Impacted Files Coverage Δ
fec/search/schedule.py 0.00% <0.00%> (ø)
fec/fec/settings/base.py 90.00% <100.00%> (+0.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants