2022-02-20 09:29:29 +05:30
|
|
|
# Backup cron (schedules).
|
|
|
|
|
2022-02-20 10:47:51 +05:30
|
|
|
# filename: backup-cron
|
2022-02-20 09:29:29 +05:30
|
|
|
# policy: ftp, read, write, policy, test
|
2022-02-20 10:47:51 +05:30
|
|
|
|
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" \
|
2022-02-20 10:47:51 +05:30
|
|
|
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
|