Community discussions

MikroTik App
 
User avatar
mag
Member
Member
Topic Author
Posts: 376
Joined: Thu Jul 01, 2004 12:32 pm
Location: Cologne, NRW, Germany
Contact:

script for moving forced dsl-disconnect to late night

Sat Mar 11, 2006 3:33 pm

As i don't want the every 24-hours forced T-DSL-disconnects to occur at 10 a.m., i wrote this little script:
/system script
add name=pppoe_dis source={
/interface pppoe-client disable [find name="<t-dsl-name>"]
:delay 10
/interface pppoe-client enable [find name="<t-dsl-name>"]
:log info "Script pppoe_dis - scheduled T-DSL-disconnect."
}

/ system scheduler 
add name="sched_disconnect" on-event=pppoe_dis start-date=jan/01/2006 start-time=03:00:00 interval=1d \ 
comment="move daily T-DSL-disconnect to late night" disabled=no
<t-dsl-name> has to be replaced with the real pppoe-client-name.

(Perhaps some one of the "scripting-gods" could comment it? Seems to be working though)
Last edited by mag on Mon Mar 13, 2006 3:24 pm, edited 1 time in total.
 
cmit
Forum Guru
Forum Guru
Posts: 1547
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Mon Mar 13, 2006 3:16 pm

Looks good - apart from that fact that you have the scheduler-task still disabled, to the script won't run automatically.

So: Put it in the wiki! ;)

Best regards,
Christian Meis
 
User avatar
mag
Member
Member
Topic Author
Posts: 376
Joined: Thu Jul 01, 2004 12:32 pm
Location: Cologne, NRW, Germany
Contact:

Mon Mar 13, 2006 3:25 pm

thx. edited.
 
IntraLink
Member Candidate
Member Candidate
Posts: 113
Joined: Fri May 28, 2004 5:44 pm
Location: Utah Valley
Contact:

Fri May 19, 2006 7:02 am

Thanks man, I used your script to reset my problematic wireless connection every 30 minutes until I can drive up the mountian and fix it.

Who is online

Users browsing this forum: No registered users and 54 guests