host1#
schedule macro at 14:35 m.mac m
host1#
show schedule macro m.mac
interval
macro privilege interval frequency
file name macro level time-of-day (minutes) schedule started
--------- -------- --------- ------------ --------- ------------------- -------
m.mac Freddie 15 00:10 sunday --- 2008-09-28 00:00:00 ---
host1#
When you show the directory listing, the schedule macro m.mac is marked in use
and cannot be modified.
unshared in
file size size date (UTC) use
----------------------------- -------- -------- ------------------- ---
disk0:m.mac 438 438 01/26/2007 10:12:26 !
disk0:fc.mac 515 515 01/26/2007 12:29:14
disk0:b.mac 7728 7728 02/05/2007 13:55:10 !
disk0:c.mac 146 146 02/07/2007 16:09:12
disk0:mmcX2.rel 83859484 83859484 02/05/2007 16:01:50 !
Observe the macroScheduler log for the execution of macro m.mac:
NOTICE 02/14/2007 14:35:01 macroScheduler: macro m.mac started with ID 3
NOTICE 02/14/2007 14:35:01 macroScheduler: macro m.mac with ID 3 ran
successfully
NOTICE 02/14/2007 14:35:01 macroScheduler: (Id: 3) operation is 7 * 6 * 5
NOTICE 02/14/2007 14:35:01 macroScheduler: (Id: 3) theResult is 210
After the macro is executed, it is no longer in the list of scheduled macros.
host1#
show schedule macro m.mac
% Command failed
unshared in
file size size date (UTC) use
----------------------------- -------- -------- ------------------- ---
disk0:m.mac 438 438 01/26/2007 10:12:26
disk0:fc.mac 515 515 01/26/2007 12:29:14
disk0:b.mac 7728 7728 02/05/2007 13:55:10 !
disk0:c.mac 146 146 02/07/2007 16:09:12
disk0:mmcX2.rel 83859484 83859484 02/05/2007 16:01:50 !
Example
Macro getuptime, scheduled to run at a regular interval uses regular expression
matching to find the system running time in the
show version
report. It then uses
regular expression matching on the line containing the system running time to
determine the days, hours, minutes, and seconds.
host1#
schedule macro interval frequency 60 b.mac getuptime
host1#
show schedule macro
b.mac getuptime scheduled to run at 2007-02-14 11:58:06
See the macroScheduler log for the execution of macro b.mac.
Scheduling Macros
■
501
Chapter 8: Writing CLI Macros
Содержание JUNOSe 11.1
Страница 6: ...vi...
Страница 8: ...viii JUNOSe 11 1 x System Basics Configuration Guide...
Страница 24: ...xxiv List of Figures JUNOSe 11 1 x System Basics Configuration Guide...
Страница 32: ...2 Chapters JUNOSe 11 1 x System Basics Configuration Guide...
Страница 58: ...28 Configuring Remote Access JUNOSe 11 1 x System Basics Configuration Guide...
Страница 176: ...146 Downgrading JUNOSe Software JUNOSe 11 1 x System Basics Configuration Guide...
Страница 280: ...250 Monitoring SNMP JUNOSe 11 1 x System Basics Configuration Guide...
Страница 384: ...354 Monitoring the System JUNOSe 11 1 x System Basics Configuration Guide...
Страница 446: ...416 Monitoring Modules JUNOSe 11 1 x System Basics Configuration Guide...
Страница 580: ...550 Monitoring Virtual Routers JUNOSe 11 1 x System Basics Configuration Guide...
Страница 581: ...Part 2 Reference Material Abbreviations and Acronyms on page 553 References on page 571 Reference Material 551...
Страница 582: ...552 Reference Material JUNOSe 11 1 x System Basics Configuration Guide...
Страница 622: ...592 Hardware Standards JUNOSe 11 1 x System Basics Configuration Guide...
Страница 623: ...Part 3 Index Index on page 595 Index 593...
Страница 624: ...594 Index JUNOSe 11 1 x System Basics Configuration Guide...
Страница 640: ...610 Index JUNOSe 11 1 x System Basics Configuration Guide...