From 52e4d19e2349939374f8324e765d464d4229104e Mon Sep 17 00:00:00 2001 From: Matan Sarsha Date: Sun, 1 Sep 2024 20:41:52 +0300 Subject: [PATCH] feat(scripts): cronjob --- install/freegamesclaimer-install.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/install/freegamesclaimer-install.sh b/install/freegamesclaimer-install.sh index 47c30c58..5707a790 100644 --- a/install/freegamesclaimer-install.sh +++ b/install/freegamesclaimer-install.sh @@ -75,17 +75,14 @@ EOF msg_ok "Created dummy config file" msg_info "Creating cron jobs" - msg_info "Creating daily cronjob for epic games" - crontab -l | grep -v "0 0 * * * cd /opt/freegamesclaimer && node epic-games" | crontab - - echo "0 0 * * * /path/to/your/command" | crontab - - -# (crontab -l ; echo "0 0 * * * cd /opt/freegamesclaimer && node epic-games") | crontab - - msg_ok "created" - - msg_info "Creating daily cronjob for gog" -# (crontab -l ; echo "2 0 * * * cd /opt/freegamesclaimer && node gog") | crontab - - msg_ok "created" +cat </opt/claimer_cron_creator.sh + (crontab -l ; echo "0 0 * * * cd /opt/freegamesclaimer && node epic-games") | crontab - + (crontab -l ; echo "5 0 * * * cd /opt/freegamesclaimer && node gog") | crontab - +EOF +cd /opt +chmod +x ./claimer_cron_creator.sh +./claimer_cron_creator.sh msg_ok "Cron jobs created" motd_ssh