disable pppoe-out at certain hours

Hi,

I have a SXT Lite device,
I was wondering if it is possible to disable the pppoe-out connection daily at certain hours automatically!
I don’t have any user management configuration and the users are connected via an access point which is connected to the SXT.
and I just need to disable internet access for entire users at specific hours everyday.

Thanks

Sure, just do 2 scripts that disable and enable the ppp-out and schedule them.

Thanks for your response,
could you explain more in an example?

Disable line:

/interface pppoe-client disable [find name="pppoe-out1"];

Enable line:

/interface pppoe-client enable [find name="pppoe-out1"];

You have figure out the rest on yourself.

Thanks,
first I added a script with the following content in system>script :
/interface pppoe-client disable pppoe-out1
:delay 6h
/interface pppoe-client enable pppoe-out1then i added a schedule in system>scheduler , set the prefered start time and pasted the script name in the “On Event” text box

tested it, worked just fine!

note that clock settings are adjusted correctly in system>clock


added later : the interval time in schedule settings which I guess is needed to be set to 24 hours if you want the schedule to be repeated everyday. please correct me if I’m wrong.

Thanks

It is preferable to make 2 schedule entries for that, and also make an entry to run the enable after startup.

one more thing that i forgot was the interval time in schedule settings which I guess is needed to be set to 24 hours if you want the schedule to be repeated everyday.

Thanks,
In my case I only needed the connection to be enabled only for some hours and disabled at other times.
but I have taken your advice and now I use two schedules one for the enabling time and the other for when the connection is needed to be disabled,

Just for record as you have moved to two scripts:
Two scripts are better. One is running 6h instead of “two moments”.
What if router will reboot? PPoE will be disabled till next run of your script + 6 hours = two days later.

That is why I added “and also make an entry to run the enable after startup”.
It is easy to add a third scheduled job that runs at startup and that also does the enable command.
Of course that means the internet is enabled when the router is rebooted in the interval it has to be disabled.
However, that could be better than having no internet during the remaining time.
To make it perfect, that 3rd job would have to check the current time and act accordingly. However, it is a bit
tricky because the correct time is set in the router only a while after it has started (and the network has come up).
When it starts with pppoe disabled, it does not even have a way to set the time. The time will be a couple of hours
behind until the pppoe is enabled and it can set it again.