macro
file name
macro
---------
---------
fred.mac
Freddie
*joe.mac
start
john.mac
getuptime
larry.mac
start
moe.mac
start
file
-----------------------------
disk0:m.mac
disk0:fc.mac
disk0:b.mac
disk0:c.mac
disk0:mmcX2.rel
Example
Copyright © 2010, Juniper Networks, Inc.
host1#schedule macro at 20:00 February 16 larry.mac getuptime
To show the set of currently scheduled macros (asterisks indicate persistent macros):
host1#show schedule macro
privilege
interval
level
time-of-day
---------
------------------
15
00:10 DayOfMonth:2
15
00:00 sunday
15
---
15
---
15
---
To display the run time of one macro scheduled in Global Configuration mode, creating
an entry that l persists across reboots:
host1#show schedule macro joe.mac
joe.mac start is persistent and scheduled to run at 2007-02-18 00:00:00
To display the start time of one running macro:
host1#show schedule macro john.mac
john.mac getuptime started at 2007-02-14 14:26:39
When you show the running configuration, joe.mac is the only one reported, because the
other macros were scheduled in Privileged Exec mode.
host1#show conf | include schedule
schedule macro joe.mac interval time-of-day 00:00 day-of-week sunday start
When you display the directory listing, it shows the scheduled macros are all in-use and
cannot be deleted:
unshared
size
size
--------
--------
438
515
7728
7728
146
859484
83859484
host1#delete joe.mac
% File in use
Running a scheduled macro one time. Run macro m in m.mac at 14:35 today.
host# more m.mac
<# m(left,right,third) #>
<# mult := left * right #>
<# multFinal :=
mult * third #>
<# env.setResult("operation", "" $ left $ " * " $ right $ " * " $ third) #>
interval
frequency
(minutes)
---------
-------------------
---
2007-03-02 00:10:00
---
2007-02-18 00:00:00
30
2007-02-14 14:26:38
---
2007-02-16 20:00:00
---
2007-02-14 20:00:00
date (UTC)
-------------------
438
01/26/2007 10:12:26
515
01/26/2007 12:29:14
02/05/2007 13:55:10
146
02/07/2007 16:09:12
02/05/2007 16:01:50
Chapter 8: Writing CLI Macros
schedule
started
-------
---
---
---
---
---
in
use
---
!
!
!
!
!
485
Need help?
Do you have a question about the JUNOSE SOFTWARE FOR E SERIES 11.3.X - SYSTEM BASICS CONFIGURATION GUIDE 2010-10-04 and is the answer not in the manual?
Questions and answers