EasyManua.ls Logo

Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X

Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X
640 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 versionreport. 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

Table of Contents

Related product manuals