Please help with a very simple script [SOLVED]

Hello,

I am new to RouterOS and I’m trying to figure this out:

I want to disable an ARP entry by night and that’s to disable Internet access by night.
At the console, all I have to do is:

/ip arp disable 0

How can I write this in a script to be scheduled?

Thank you.

You can simply make schedules for enabling and disabling ARP entry using scheduler:
http://wiki.mikrotik.com/wiki/Manual:System/Scheduler

Yes, I tried and I read and read and read. I just can’t figure out how to write this simple command in the script file. All what I read is ‘if, else and do’ which I don’t need.

By the way, I am using Winbox.

Here is an example:
schedules.png

Hi again.

This is what I’ve been trying and nothing would happen:

You can’t use item numbers in scripts.

/ip arp { disable [find comment="emachine-wifi"] };

Schedule that to run at night, then schedule an enable version to run in the morning.

Thank you sooooo much! The problem is solved.

Now I understand the syntax well.

I think this topic will help other users too, for its simplicity.

Hello, there is still a problem:

The script didn’t run on the schedule, here is a screenshot:\

Thanks for ur help//

It will run exactly as scheduled, in -41.5 years.

Ohhhh hahahahahaha…

I thought the start date wasn’t important in my case…

Dear all ,

i have requests in mikrotik plzzzzz help me to solve it , i need a script to disable internet access for some users during specific time for e.g from 11:00 till 13:00 only two hours daily , so how can i do it in the mikrotik (note: i am not using hotspot).

2nd problem: is how to disable windows live messenger (MSN) , yahoo messenger , and most of chatting messengers in the mikrotik for some users also not for all, also during specific time if possible (note: i am not using hotspot).

that’s all, i hope you can help me in solving these problems

Thanks in advance

waiting your reply

And how are users defined ? Like IP address list or MAC address list ? Try MK wiki for example …

Otherwise answer me and I can help you, I hope … :sunglasses:

Dear My Freind,

thanks for replying but regarding the users, i assigned each user to his mac address, and i am controlling the internet access from IP > ARP List, but manually, i want to make the controlling automatically for some users (not all users) by making a script and scheduler to do this in order to access internet during specific time for e.g from 11:00 to 13:00 daily (i am not using hotspot and i dont have web proxy).

the 2nd problem is how to block all messengers applications (windows live messenger, yahoo , … ) on some users also but not all by accessing the internet during specific time and permanetly if possible( i am not using hotspot and i dont have web proxy).


thats all i am sorry if you didnt get my point

Thanks alot