cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1514
Views
0
Helpful
13
Replies

how to use EMM to run a scheduled job

applegreen
Level 1
Level 1

Hi, Expert

I am new to this EMM, I am wondering if I can use EMM to run a scheduled job ( the job is to clear ports at 6:35 PM everyday), because it is interactive and it's not supported by kron, Can you please advise how to create a EMM applet to run this job

thanks in advance

1 Accepted Solution

Accepted Solutions

Here you go:

event manager applet clear-port

event timer cron cron-entry "35 18 * * *"

action 1.0 cli command "enable"

action 2.0 cli command "clear port 1/0 1/107" pattern "confirm"

action 3.0 cli command "y"

This will run the command at 18:35 every day.

View solution in original post

13 Replies 13

Jon Marshall
Hall of Fame
Hall of Fame

You will get a much quicker and better answer to this query if you move or repost this into the Network Management forum where Joe Clarke, who is a Cisco expert on EEM, answers questions.

Jon

than you Jon

Joe Clarke
Cisco Employee
Cisco Employee

Are you asking about EMM (Embedded Menu Manager) or Embedded Event Manager (EEM)?  It sounds like you want EEM to do this.  What is the command you want to run?

Hi, Joseph

sorry it was my mistake, yes, it is EEM.

the task I want to accomplish is : On a AS5350 access server for outband modem dialing, everyday 6:35 pm, I want to run a command " clear port 1/100 1/107' to clear all modem sessions to get ready for production scheduled job.

the version of IOS is 12.4(11)t4

Please advise

thanks in advice

Yvonne

No problem.  You can do this with an applet.  What is the output of the clear port command?

Joseph, thanks, my problem is I don't know how to control the timer to make it reoccurring. do you have some document or examples I can take a look? thanks

Send me the command output, and I'll write a sample applet for you.

Here is the output :

YYNN5350XM# clear port 1/0 1/107

This will clear ports 1/0 - 1/107[confirm]y

YYNN5350XM#

Here you go:

event manager applet clear-port

event timer cron cron-entry "35 18 * * *"

action 1.0 cli command "enable"

action 2.0 cli command "clear port 1/0 1/107" pattern "confirm"

action 3.0 cli command "y"

This will run the command at 18:35 every day.

wow, that's fast

I don't have time to test today I will test it first thing tomorrow

One more question though, our environment is AAA tacas environment, is there anything we need to consider to run " enable" regarding password?

thanks so much, you really helped a lot

FYI, if you have AAA Command authorization configured, you will also need to configure:

event manager session cli username USER

Where USER is a username capable of running all of the commands in all of your EEM policies.

Jon

a quick question: can we run two applets daily,the same function, one before a scheduled job and one after the scheduled job? I tested your applet, it works and thanks, however I created another one to have it run at different time, it didnt work, is there any limitations?

Yes, you can have as many applets configured as you'd like.  Up to 32 can run in parallel.  Post your second applet, and I will evaluate it.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: