Hello Chuck,
I found this TCL script in another thread, it uses the internal clock and tags the date to the file, ensuring its uniqueness:
::cisco::eem::event_register_timer cron cron_entry "0 22 * * *"
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
if [catch {cli_open} result] {
error $result $errorInfo
} else {
array set cli1 $result
}
array set _sinfo [sys_reqinfo_routername]
set hostname $_sinfo(routername)
if [catch {cli_exec $cli1(fd) "show clock"} cli_output] {
error $cli_output $errorInfo
} else {
set current_time $cli_output
}
set year [lindex $current_time 12]
set month [lindex $current_time 3]
set day [lindex $current_time 4]
set temp [lindex $current_time 5]
set hour [string range $temp 0 1]
set minute [string range $temp 3 4]
set second [string range $temp 6 7]
append time $hour "." $minute "." $second
append date $month "-" $day "-" $year "-" $time
append filename $hostname "-" $date
if [catch {cli_exec $cli1(fd) "sh run | file ftp://username:password@192.168.1.1/$filename"} cli_output] {
error $cli_output $errorInfo
}
if [catch {cli_close $cli1(fd) $cli1(tty_id)} result] {
error $result $errorInfo