manage-client.cron 1.2 KB

12345678910111213141516171819202122232425262728
  1. # Manage Client - cron examples
  2. #
  3. # Adjust the paths and add with `crontab -e`.
  4. # Check the PHP path with: which php
  5. #
  6. # --quiet suppresses normal output. Errors still go to STDERR and are
  7. # delivered by cron via mail.
  8. MAILTO=admin@example.org
  9. # Nightly backup at 03:20.
  10. 20 3 * * * /usr/bin/php /var/www/myproject/manage-client/bin/manage-client.php backup --trigger=cron --quiet
  11. # Status report to the Manage server, hourly at minute 7.
  12. 7 * * * * /usr/bin/php /var/www/myproject/manage-client/bin/manage-client.php heartbeat --quiet
  13. # Update check on weekdays at 08:00.
  14. # Exit code 2 means "update available" - cron doesn't report that on its
  15. # own, hence the explicit mail here.
  16. 0 8 * * 1-5 /usr/bin/php /var/www/myproject/manage-client/bin/manage-client.php check --quiet || true
  17. # Updates are deliberately NOT installed automatically.
  18. # An update overwrites files while the application is live and can trigger
  19. # migrations; that belongs under supervision. If it should be automated
  20. # anyway, force a backup first:
  21. #
  22. # 30 2 * * 0 /usr/bin/php /var/www/myproject/manage-client/bin/manage-client.php backup --trigger=update --quiet && \
  23. # /usr/bin/php /var/www/myproject/manage-client/bin/manage-client.php update --yes --quiet