host1#schedule macro at 14:35 m.mac m
host1#show schedule macro m.mac
file name
--------- -------- --------- ------------ --------- ------------------- -------
m.mac
host1#
When you show the directory listing, the schedule macro m.mac is marked in use
and cannot be modified.
-----------------------------
disk0:m.mac
disk0:fc.mac
disk0:b.mac
disk0:c.mac
disk0:mmcX2.rel
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
-----------------------------
disk0:m.mac
disk0:fc.mac
disk0:b.mac
disk0:c.mac
disk0:mmcX2.rel
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.
macro
privilege
macro
level
Freddie
15
file
file
interval
interval
frequency
time-of-day
(minutes)
00:10 sunday
---
unshared
size
size
--------
--------
438
438
515
515
7728
7728
146
146
83859484
83859484
unshared
size
size
--------
--------
438
438
515
515
7728
7728
146
146
83859484
83859484
Chapter 8: Writing CLI Macros
schedule
started
2008-09-28 00:00:00
---
in
date (UTC)
use
-------------------
---
01/26/2007 10:12:26
!
01/26/2007 12:29:14
02/05/2007 13:55:10
!
02/07/2007 16:09:12
02/05/2007 16:01:50
!
in
date (UTC)
use
-------------------
---
01/26/2007 10:12:26
01/26/2007 12:29:14
02/05/2007 13:55:10
!
02/07/2007 16:09:12
02/05/2007 16:01:50
!
501
Scheduling Macros
Need help?
Do you have a question about the SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X and is the answer not in the manual?