One example in this manual displays using of the action_syslog
command to log an event. Could you please try to replace all your exec
s with such a call and see if a message gets logged at all? That is, does your script even run? Also, when the run time of the script passes by, does anything gets currently logged on a system level (like the notice about the failed script execution or whatnot)?
If the script runs, then I suggest enclosing all your exec
s in a catch
command to trap possible errors and log them, like this:
::cisco::eem::event_register_timer cron name crontimer2 cron_entry $_cron_entry
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
set code [catch {
exec "en"
exec "cd RuBAN"
exec "delete syslogsyslog_fresh_install.tcl"
exec "delete syslogsyslog_fresh_install.cfg"
exec "delete marvin_fresh_installMarvinfieldst.tcl"
exec "conf t"
exec "no ev m p syslogsyslog_fresh_install.tcl"
exec "no ev m p marvin_fresh_installMarvinfieldst.tcl"
} res]
if {$code != 0} {
action_syslog priority error msg $res
}
# OK, the commands in the `catch`ed block went well...
Please note that I have absolutely no experience with Cisco IOS so I'm thinking in terms of Tcl running on "conventional" platforms (such as POSIX and Windows).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…