Skip to content

Commit d766853

Browse files
wallos: add cron in installer for yearly cost (#6133)
* wallos: fix: yearly cost * Update wallos.sh * Update wallos.sh --------- Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
1 parent 30ca65e commit d766853

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

ct/wallos.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ function update_script() {
4141
rm -rf /opt/wallos/db/wallos.empty.db
4242
mv /opt/wallos.db /opt/wallos/db/wallos.db
4343
mv /opt/logos/* /opt/wallos/images/uploads/logos
44+
if ! grep -q "storetotalyearlycost.php" /opt/wallos.cron; then
45+
echo "30 1 * * 1 php /opt/wallos/endpoints/cronjobs/storetotalyearlycost.php >> /var/log/cron/storetotalyearlycost.log 2>&1" >> /opt/wallos.cron
46+
fi
4447
chown -R www-data:www-data /opt/wallos
4548
chmod -R 755 /opt/wallos
4649
mkdir -p /var/log/cron

install/wallos-install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ cat <<EOF >/opt/wallos.cron
6464
*/2 * * * * php /opt/wallos/endpoints/cronjobs/sendverificationemails.php >> /var/log/cron/sendverificationemail.log 2>&1
6565
*/2 * * * * php /opt/wallos/endpoints/cronjobs/sendresetpasswordemails.php >> /var/log/cron/sendresetpasswordemails.log 2>&1
6666
0 */6 * * * php /opt/wallos/endpoints/cronjobs/checkforupdates.php >> /var/log/cron/checkforupdates.log 2>&1
67+
30 1 * * 1 php /opt/wallos/endpoints/cronjobs/storetotalyearlycost.php >> /var/log/cron/storetotalyearlycost.log 2>&1
6768
EOF
6869
crontab /opt/wallos.cron
6970
msg_ok "Crontabs setup"

0 commit comments

Comments
 (0)