Code: Select all
/system backup save name=email_backup
/tool e-mail send file=email_backup.backup to="me@test.com" body="See attached file" \
subject="$[/system identity get name] $[/system clock get time] $[/system clock get date] Backup")
/import filename
it, as that just tries to execute that code exactly once.
It seems I have to excapsulate the give code with the actual 'script add' command IN THE FILE:
Code: Select all
/system script add name="sched_backup_email" source={
/export file=current_config hide-sensitive
/tool e-mail send file=current_config.rsc to="admin@koerber.org" body="See attached file" \
subject="$[/system identity get name] $[/system clock get time] $[/system clock get date] configuration export"
}
tell the scheduler to run a file.
Am I missing anything?