script for moving forced dsl-disconnect to late night

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

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)

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! :wink:

Best regards,
Christian Meis

thx. edited.

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.