Community discussions

MikroTik App
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Scheduled script not running

Tue Apr 26, 2016 3:05 pm

Hi,

I have a script installed in my Mikrotik router, but it´s not running in the desired time.

https://snag.gy/a6xq9N.jpg

Image

Can you tell me what´s wrong here ?

Thanks
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7198
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Scheduled script not running

Tue Apr 26, 2016 3:16 pm

You didn't specify any script to run "on-event"
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Re: Scheduled script not running

Tue Apr 26, 2016 5:01 pm

Thanks a lot.
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Re: Scheduled script not running

Wed Apr 27, 2016 3:54 pm

My script didn´t run at the specified time, am I forgetting anything ?

In the field "On Event" I put the script name: "Mac-Change"
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 3095
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: Scheduled script not running

Wed Apr 27, 2016 3:57 pm

Are you sure that the script is syntactically correct ? Script with errors could not "run".
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Re: Scheduled script not running

Wed Apr 27, 2016 4:08 pm

The script is working fine, when I run it I get the message in the Log area:

New MAC 602d0cbf1d28

And the router´s MAC addres is changed, but it´s not running in the scheduller.

Need I mark any option in the "Policy" area ?

Image
Are you sure that the script is syntactically correct ? Script with errors could not "run".
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7198
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Scheduled script not running

Wed Apr 27, 2016 4:53 pm

It doesn't say much
post the code of your script.
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Re: Scheduled script not running

Wed Apr 27, 2016 4:59 pm

I got the script from this forum:

http://forum.mikrotik.com/viewtopic.php?t=102357

I created a new schedul - Let´s see tomorrow what´s happen...


Image

It doesn't say much
post the code of your script.
 
IntrusDave
Forum Guru
Forum Guru
Posts: 1286
Joined: Fri May 09, 2014 4:36 am
Location: Rancho Cucamonga, CA

Re: Scheduled script not running

Wed Apr 27, 2016 5:00 pm

Your On Event should read
/system script run Mac-Change
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7198
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Scheduled script not running

Wed Apr 27, 2016 5:07 pm

Your On Event should read
/system script run Mac-Change
No, it is enough to specify valid script name.
 
IntrusDave
Forum Guru
Forum Guru
Posts: 1286
Joined: Fri May 09, 2014 4:36 am
Location: Rancho Cucamonga, CA

Re: Scheduled script not running

Wed Apr 27, 2016 5:10 pm

No, it is enough to specify valid script name.
I have had issues with that in the past, so I have always put the whole command in.
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Re: Scheduled script not running

Thu Apr 28, 2016 3:03 pm

Unfortunately my scripts didn´t work. The router´s mac addres wasn´t changed, and I can´t see any data about
Mac changes in the log area:

Image


When I run the script by hand I can see the information in the log area:

Image
 
IntrusDave
Forum Guru
Forum Guru
Posts: 1286
Joined: Fri May 09, 2014 4:36 am
Location: Rancho Cucamonga, CA

Re: Scheduled script not running

Fri Apr 29, 2016 5:56 am

Do both the script and the schedule have full permissions?
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Re: Scheduled script not running

Fri Apr 29, 2016 7:50 am

Can you tell me how enable permissions in the scripts ?
 
IntrusDave
Forum Guru
Forum Guru
Posts: 1286
Joined: Fri May 09, 2014 4:36 am
Location: Rancho Cucamonga, CA

Re: Scheduled script not running

Fri Apr 29, 2016 5:24 pm

In the "Policy" section. Try marking all of the boxes.
Also, if you post the script, we can test it and see what's going on.
Screen Shot 2016-04-29 at 7.22.38 AM.png
Screen Shot 2016-04-29 at 7.22.50 AM.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Re: Scheduled script not running

Fri Apr 29, 2016 5:40 pm

This is the script:

http://forum.mikrotik.com/viewtopic.php?t=102357


I did your recommendation and check all box in the Policy area:

Image

Let´s go to see what´s happen tomorrow...
In the "Policy" section. Try marking all of the boxes.
Also, if you post the script, we can test it and see what's going on.
Screen Shot 2016-04-29 at 7.22.38 AM.png
Screen Shot 2016-04-29 at 7.22.50 AM.png
 
User avatar
valdemirs
newbie
Topic Author
Posts: 26
Joined: Sat Apr 18, 2015 5:33 pm

Re: Scheduled script not running

Sat Apr 30, 2016 6:52 pm

Problem solved !

Thanks a lot for your answers .
 
IntrusDave
Forum Guru
Forum Guru
Posts: 1286
Joined: Fri May 09, 2014 4:36 am
Location: Rancho Cucamonga, CA

Re: Scheduled script not running

Sat Apr 30, 2016 8:03 pm

Glad to have helped.