codeforcroatia / popravi.to

This is popular map-based reporting platform FixMyStreet for Croatia named "Popravi.to"
http://popravi.to
Other
9 stars 7 forks source link

Set alerts cronjob every x hours #165

Closed schlos closed 2 years ago

schlos commented 2 years ago

Describe the bug

Alerts email every 1h

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Set alerts cronjob every 6h

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

https://github.com/codeforcroatia/popravi.to/blob/develop/conf/crontab-example#L17

schlos commented 2 years ago

Done with crontab change: sudo -u fms crontab -e

2 */6 * * * "/var/www/popravi.to/fixmystreet/commonlib/bin/run-with-lockfile.sh" -n "/var/www/popravi.to/send-alerts.lock" "/var/www/popravi.to/fixmystreet/bin/send-alerts" || echo "stalled?"

Validate crontab expression: https://crontab.guru

schlos commented 2 years ago

Updated to every 4 hours during the day (8-20h): crontab expression https://crontab.guru

schlos commented 2 years ago

Updated to 2x a day: crontab expression https://crontab.guru

schlos commented 2 years ago

Updated to 1x a day: crontab expression https://crontab.guru