From f86434cb2777b1fa9f46138f5f278d3f1c3d6201 Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Tue, 15 Jun 2021 19:21:55 +0530 Subject: [PATCH] use a job runner script so that env variables can be set --- crontab | 78 +++++++++++++++++++++++++++------------------------------ job | 6 +++++ 2 files changed, 43 insertions(+), 41 deletions(-) create mode 100644 job diff --git a/crontab b/crontab index d3c72c7..91a922c 100644 --- a/crontab +++ b/crontab @@ -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 \ No newline at end of file +8 16 * * * jsub -quiet -N gans-list -mem 900m ~/SDZeroBot/job most-gans/gans-lister.js \ No newline at end of file diff --git a/job b/job new file mode 100644 index 0000000..91fd3a4 --- /dev/null +++ b/job @@ -0,0 +1,6 @@ +#!/bin/bash + +export CRON=true; +cd /data/project/sdzerobot/SDZeroBot || exit 1; +/data/project/sdzerobot/bin/node $@ +