Skip to content

Commit

Permalink
use a job runner script so that env variables can be set
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Jun 15, 2021
1 parent b638764 commit f86434c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 41 deletions.
78 changes: 37 additions & 41 deletions crontab
Original file line number Diff line number Diff line change
Expand Up @@ -25,66 +25,62 @@
# the two.
#

# Environment variables
CRON=true

# m h dom mon dow job name memory executable file path
0 2 1 * * jsub -quiet -N job-MIS -mem 900m ~/bin/node ~/SDZeroBot/reports/most-imported-scripts/most-imported-scripts.js
0 2 15 * * jsub -quiet -N job-MIS -mem 900m ~/bin/node ~/SDZeroBot/reports/most-imported-scripts/most-imported-scripts.js
# m h dom mon dow name memory executable file path
0 2 1 * * jsub -quiet -N job-MIS -mem 900m ~/SDZeroBot/job reports/most-imported-scripts/most-imported-scripts.js
0 2 15 * * jsub -quiet -N job-MIS -mem 900m ~/SDZeroBot/job reports/most-imported-scripts/most-imported-scripts.js

0 2 * * * jsub -quiet -N job-AFC -mem 1g ~/bin/node ~/SDZeroBot/reports/afc-sorting/afc-sorting.js
0 10 * * * jsub -quiet -N job-AFC -mem 1g ~/bin/node ~/SDZeroBot/reports/afc-sorting/afc-sorting.js
0 18 * * * jsub -quiet -N job-AFC -mem 1g ~/bin/node ~/SDZeroBot/reports/afc-sorting/afc-sorting.js
0 2 * * * jsub -quiet -N job-AFC -mem 1g ~/SDZeroBot/job reports/afc-sorting/afc-sorting.js
0 10 * * * jsub -quiet -N job-AFC -mem 1g ~/SDZeroBot/job reports/afc-sorting/afc-sorting.js
0 18 * * * jsub -quiet -N job-AFC -mem 1g ~/SDZeroBot/job reports/afc-sorting/afc-sorting.js

0 1 * * * jsub -quiet -N job-NPP -mem 4g ~/bin/node ~/SDZeroBot/reports/npp-sorting/npp-sorting.js
0 13 * * * jsub -quiet -N job-NPP -mem 4g ~/bin/node ~/SDZeroBot/reports/npp-sorting/npp-sorting.js
0 1 * * * jsub -quiet -N job-NPP -mem 4g ~/SDZeroBot/job reports/npp-sorting/npp-sorting.js
0 13 * * * jsub -quiet -N job-NPP -mem 4g ~/SDZeroBot/job reports/npp-sorting/npp-sorting.js

30 0 * * * jsub -quiet -N job-PROD -mem 2g ~/bin/node ~/SDZeroBot/reports/prod-sorting/prod-sorting.js
30 4 * * * jsub -quiet -N job-PROD -mem 2g ~/bin/node ~/SDZeroBot/reports/prod-sorting/prod-sorting.js
30 8 * * * jsub -quiet -N job-PROD -mem 2g ~/bin/node ~/SDZeroBot/reports/prod-sorting/prod-sorting.js
30 12 * * * jsub -quiet -N job-PROD -mem 2g ~/bin/node ~/SDZeroBot/reports/prod-sorting/prod-sorting.js
30 16 * * * jsub -quiet -N job-PROD -mem 2g ~/bin/node ~/SDZeroBot/reports/prod-sorting/prod-sorting.js
30 20 * * * jsub -quiet -N job-PROD -mem 2g ~/bin/node ~/SDZeroBot/reports/prod-sorting/prod-sorting.js
30 0 * * * jsub -quiet -N job-PROD -mem 2g ~/SDZeroBot/job reports/prod-sorting/prod-sorting.js
30 4 * * * jsub -quiet -N job-PROD -mem 2g ~/SDZeroBot/job reports/prod-sorting/prod-sorting.js
30 8 * * * jsub -quiet -N job-PROD -mem 2g ~/SDZeroBot/job reports/prod-sorting/prod-sorting.js
30 12 * * * jsub -quiet -N job-PROD -mem 2g ~/SDZeroBot/job reports/prod-sorting/prod-sorting.js
30 16 * * * jsub -quiet -N job-PROD -mem 2g ~/SDZeroBot/job reports/prod-sorting/prod-sorting.js
30 20 * * * jsub -quiet -N job-PROD -mem 2g ~/SDZeroBot/job reports/prod-sorting/prod-sorting.js

30 1 * * * jsub -quiet -N job-AFD -mem 1g ~/bin/node ~/SDZeroBot/reports/afd-sorting/afd-sorting.js
30 5 * * * jsub -quiet -N job-AFD -mem 1g ~/bin/node ~/SDZeroBot/reports/afd-sorting/afd-sorting.js
30 9 * * * jsub -quiet -N job-AFD -mem 1g ~/bin/node ~/SDZeroBot/reports/afd-sorting/afd-sorting.js
30 13 * * * jsub -quiet -N job-AFD -mem 1g ~/bin/node ~/SDZeroBot/reports/afd-sorting/afd-sorting.js
30 17 * * * jsub -quiet -N job-AFD -mem 1g ~/bin/node ~/SDZeroBot/reports/afd-sorting/afd-sorting.js
30 21 * * * jsub -quiet -N job-AFD -mem 1g ~/bin/node ~/SDZeroBot/reports/afd-sorting/afd-sorting.js
30 1 * * * jsub -quiet -N job-AFD -mem 1g ~/SDZeroBot/job reports/afd-sorting/afd-sorting.js
30 5 * * * jsub -quiet -N job-AFD -mem 1g ~/SDZeroBot/job reports/afd-sorting/afd-sorting.js
30 9 * * * jsub -quiet -N job-AFD -mem 1g ~/SDZeroBot/job reports/afd-sorting/afd-sorting.js
30 13 * * * jsub -quiet -N job-AFD -mem 1g ~/SDZeroBot/job reports/afd-sorting/afd-sorting.js
30 17 * * * jsub -quiet -N job-AFD -mem 1g ~/SDZeroBot/job reports/afd-sorting/afd-sorting.js
30 21 * * * jsub -quiet -N job-AFD -mem 1g ~/SDZeroBot/job reports/afd-sorting/afd-sorting.js

0 1 * * * jsub -quiet -N job-notifier -mem 2g ~/bin/node ~/SDZeroBot/afd-notifications/notifier.js
0 1 * * * jsub -quiet -N job-notifier -mem 2g ~/SDZeroBot/job afd-notifications/notifier.js

0 0 * * * jsub -quiet -N job-grid -mem 2g ~/bin/node ~/SDZeroBot/reports/grid-afd-prod.js
0 0 * * * jsub -quiet -N job-grid -mem 2g ~/SDZeroBot/job reports/grid-afd-prod.js

0 5 * * * jsub -quiet -N job-gan -mem 2g ~/bin/node ~/SDZeroBot/reports/gan-sorting.js
0 5 * * * jsub -quiet -N job-gan -mem 2g ~/SDZeroBot/job reports/gan-sorting.js

10 4 * * 1 jsub -quiet -N job-g13-soon -mem 1g ~/bin/node ~/SDZeroBot/reports/g13-soon.js
10 4 * * 1 jsub -quiet -N job-g13-soon -mem 1g ~/SDZeroBot/job reports/g13-soon.js

0 0 * * * jsub -quiet -N job-declined -mem 2g ~/bin/node ~/SDZeroBot/reports/declined-afcs.js
0 0 * * * jsub -quiet -N job-declined -mem 2g ~/SDZeroBot/job reports/declined-afcs.js

0 0 * * * jsub -quiet -N job-g131week -mem 2g ~/bin/node ~/SDZeroBot/reports/g13-1week.js
0 0 * * * jsub -quiet -N job-g131week -mem 2g ~/SDZeroBot/job reports/g13-1week.js

0 0 * * * jsub -quiet -N job-g13-eligible -mem 1g ~/bin/node ~/SDZeroBot/reports/g13-eligible.js
0 0 * * * jsub -quiet -N job-g13-elig -mem 1g ~/SDZeroBot/job reports/g13-eligible.js

5 0 * * 2 jsub -quiet -N job-draft -mem 2g ~/bin/node ~/SDZeroBot/reports/draftify-watch.js
5 0 * * 2 jsub -quiet -N job-draft -mem 2g ~/SDZeroBot/job reports/draftify-watch.js

5 0 * * 3 jsub -quiet -N job-pwatch -mem 2g ~/bin/node ~/SDZeroBot/reports/prod-watch.js
5 0 * * 3 jsub -quiet -N job-pwatch -mem 2g ~/SDZeroBot/job reports/prod-watch.js

0 1 * * * jsub -quiet -N job-rwatch -mem 2g ~/bin/node ~/SDZeroBot/reports/redirectify-watch.js
0 1 * * * jsub -quiet -N job-rwatch -mem 2g ~/SDZeroBot/job reports/redirectify-watch.js

30 3 * * 2 jsub -quiet -N job-peer -mem 1g ~/bin/node ~/SDZeroBot/reports/peer-review.js
30 3 * * 2 jsub -quiet -N job-peer -mem 1g ~/SDZeroBot/job reports/peer-review.js

0 6 * * * jsub -quiet -N job-unref -mem 2g ~/bin/node ~/SDZeroBot/reports/unreferenced-blps.js
0 6 * * * jsub -quiet -N job-unref -mem 2g ~/SDZeroBot/job reports/unreferenced-blps.js

0 0 * * * jsub -quiet -N job-g13-save -mem 1g ~/bin/node ~/SDZeroBot/reports/g13-watch/save-report.js
0 0 * * * jsub -quiet -N job-g13-save -mem 1g ~/SDZeroBot/job reports/g13-watch/save-report.js

15 * * * * jsub -quiet -N stream-check -mem 400m ~/bin/node ~/SDZeroBot/eventstream-router/check.js
15 * * * * jsub -quiet -N stream-check -mem 400m ~/SDZeroBot/job eventstream-router/check.js

17 * * * * jsub -quiet -N web-check -mem 400m ~/bin/node ~/SDZeroBot/check-webservice.js
20 * * * * jsub -quiet -N bot-monitor -mem 2g ~/SDZeroBot/job bot-monitor/main.js

20 * * * * jsub -quiet -N bot-monitor -mem 2g ~/bin/node ~/SDZeroBot/bot-monitor/main.js
25 4 * * * jsub -quiet -N db-tabulator -mem 4g ~/SDZeroBot/job db-tabulator/main.js

25 4 * * * jsub -quiet -N db-tabulator -mem 4g ~/bin/node ~/SDZeroBot/db-tabulator/main.js

8 16 * * * jsub -quiet -N gans-list -mem 900m ~/bin/node ~/SDZeroBot/most-gans/gans-lister.js
8 16 * * * jsub -quiet -N gans-list -mem 900m ~/SDZeroBot/job most-gans/gans-lister.js
6 changes: 6 additions & 0 deletions job
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

export CRON=true;
cd /data/project/sdzerobot/SDZeroBot || exit 1;
/data/project/sdzerobot/bin/node $@

0 comments on commit f86434c

Please sign in to comment.