pothi.mikrotik-scripts/scripts/backup-cron.rsc

21 lines
553 B
Text
Raw Normal View History

2022-02-20 09:29:29 +05:30
# Backup cron (schedules).
# filename: backup-cron
2022-02-20 09:29:29 +05:30
# policy: ftp, read, write, policy, test
2022-02-20 09:29:29 +05:30
:local adminEmailAddress pothi@duck.com
:local deviceIdentity [/system identity get name]
:log info "Executing the script \"backup-cron\"..."
/system scheduler export file=cron; :delay 3s
/tool e-mail send to="$adminEmailAddress" \
subject="[Mikrotik $deviceIdentity] Backup of Cron Entries" \
body="See the subject and the attachment." \
2022-02-20 09:29:29 +05:30
file=cron.rsc; :delay 10s
:log info "An email is probably sent to $adminEmailAddress."
/file remove cron.rsc