| 1234567891011121314151617181920212223242526272829303132 |
- # Backup and update client — crontab lines for this installation.
- #
- # Adjust the two paths, then add them with `crontab -e`, or paste them into the
- # hosting panel's cron form. Check the PHP binary with `which php`; shared hosts
- # often want a versioned one such as /usr/bin/php8.2.
- #
- # --quiet suppresses normal output. Errors still go to STDERR, and cron mails
- # those to MAILTO — which is the whole point of running it this way.
- MAILTO=admin@example.org
- PHP=/usr/bin/php
- SITE=/var/www/html/foto-portfolio
- # Nightly backup at 03:20: data/ and media/, uploaded to the manage server.
- # Runs at night because it archives every locally hosted image.
- 20 3 * * * $PHP $SITE/manage-client/bin/manage-client.php backup --trigger=cron --quiet
- # Hourly status report: version, PHP version, free disk space, last backup.
- 7 * * * * $PHP $SITE/manage-client/bin/manage-client.php heartbeat --quiet
- # Update check on weekday mornings. Exit code 2 means "update available"; cron
- # reports a non-zero exit as mail, which is exactly the notification wanted.
- 0 8 * * 1-5 $PHP $SITE/manage-client/bin/manage-client.php check --quiet
- # Updates are deliberately not installed here. `update` overwrites files while
- # the site is live, has no rollback, and may run migrations — that belongs in
- # front of a human, at Admin -> Maintenance.
- #
- # Without cron at all: set MANAGE_BACKUP_AUTO_INTERVAL_SECONDS in
- # manage-client/config.php to 604800, and the admin dashboard makes the weekly
- # backup itself the next time it is opened.
|