Community discussions

MikroTik App
 
lukkes
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Mon Jun 16, 2008 2:12 am
Location: Venezuela
Contact:

startup script runs at every hour error

Mon Mar 04, 2013 6:03 am

good nights, i have a script to send email when the router reboots, it works fine, but sometimes it runs when the router has not reboot, also i can see that my global variables disappears from the environment tab, i checked the uptime of the router and is normal,so the router has not been rebooted. any advice? thanks

the script rebot-email
:
 name="reboot-email" owner="admin" 
     policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,
       api 
     last-started=mar/03/2013 23:03:27 run-count=1 source=
       :delay 60;
       /tool e-mail send to="myuser@gmail.com" subject=("balancer1 reinicio") >
       :log info "enviado reinicio.";

the system scheduler entry to run this script
 name="reboot-email" start-time=startup interval=0s on-event=reboot-email 
     owner="admin" policy=ftp,reboot,read,write,policy,test,winbox,password,
       sniff,sensitive,api 
     run-count=1 

 
samsung172
Forum Guru
Forum Guru
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: startup script runs at every hour error

Tue Mar 05, 2013 3:24 am

I don't know why. but have a script. setting the global a couple of times during each day.

(PS. global's are gone if router is rebooted)
 
lukkes
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Mon Jun 16, 2008 2:12 am
Location: Venezuela
Contact:

Re: startup script runs at every hour error

Tue Mar 05, 2013 3:41 am

Thanks for the answer, i really dont worry about the globals, cause is with the result of script running every 5 minutes, the real problem is why the startup script runs at many times on day if the router has not rebooted.

Who is online

Users browsing this forum: raiser and 79 guests