🌐 Overview

This configuration defines scheduled tasks usingCRON for automating the backup processes of bothHomebridge andZigbee2MQTT data. CRON is a time-based job scheduler in Unix-like operating systems. The configuration provided schedules the execution of two backup scripts at specific times daily, ensuring regular backups and logging the output for monitoring and troubleshooting.

Scheduled Tasks

The first scheduled task runs the Zigbee2MQTT Git Backup Sync script at 11 a.m. every day, while the second scheduled task runs the Homebridge Git Backup Sync script at noon every day. Both tasks redirect their output, including errors, to respective log files

🚀 Configuration

crontab
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
 
0 11 * * * /var/www/scripts/backup_zigbee2mqtt.sh >> /var/log/backup_zigbee2mqtt.log 2>&1
0 12 * * * /var/www/scripts/backup.sh >> /var/log/backup.log 2>&1