$backup.setup.add

Add a scheduled backup rule.
Syntax
    $backup.setup.add{name}{interval}{account_list}{path_list}{enabled}
Documentation$backup.setup.add:
Add a scheduled backup rule. The rule will be applied, if enabled, after interval time elapsed. The resulting backup file will automatically be stored under backup:// and its name es accessable vie $backup.getLastFile{name}. The value for interval may either be DAILY, WEEKLY, MONTHLY or an integer interpreted as number of hours.
    Paramter:
      1 - name; a free identifier to distinguish different rules
      2 - interval; when the rule shall be applied
      3 - account_list; whitespace separated account IDs
      4 - path_list; (\r)\n separated list of paths to backup
      5 - enabled; boolean; initially enable this rule or not
    Returns:
      Void.
    Throws:
      IllegalArgumentException
Examples
$io.sendBytes{1}{} $// backup $if{$existsCurrent{backup}}{ $io.sendBytes{1}{Adding backup rule.
} $backup.setup.add{backup_test}{1}{$getCurrent{i}}{public://index.html}{0} $io.sendBytes{1}{Committing transaction.
} $commit{NONE} $io.sendBytes{1}{Flagging backup start.
} $backup.start{backup_test} $io.sendBytes{1}{Now waiting for backup to start. This may take a while.
} $while{$isEmpty{$backup.getLastFile{backup_test}}}{ $io.sendBytes{1}{Waiting 5 sec...
} $sleep{5000} } } { Backup this account now.

} $// restore $if{$existsCurrent{restore}}{ $set{file}{$backup.getLastFile{backup_test}} File: $get{file}
Account id list: $backup.restore.getStoredAccounts{$get{file}}
File list: $backup.restore.getStoredFiles{$get{file}}
$if{$existsCurrent{restore}}{ $backup.restore.apply{$get{file}} } Restored.
} { Restore now.

} $// remove rule $if{$existsCurrent{remove}} { $backup.setup.remove{backup_test} } { $if{$backup.setup.exists{backup_test}}{Remove test backup rule.

} }

GroupSpecial
Minimum required transaction-mode:UPDATE=TREE
Required scripting permission of the developerPERMISSION_FL_ADMINISTRATIVE
Minimum parameters5
Maximum parameters 5