Community discussions

MikroTik App

Search found 334 matches

  • 1
  • 2
by eldoncito2019
Mon Mar 25, 2024 9:23 pm
Forum: Scripting
Topic: hotspot expired date from scheduler
Replies: 1
Views: 213

Re: hotspot expired date from scheduler

Greetings, I hope this helps you
 interval= [/ip hotspot user profile get [find where name="$userprofile"] session-timeout]]
by eldoncito2019
Thu Feb 29, 2024 8:16 pm
Forum: Scripting
Topic: hotspot usernam: deletion of user beyond the deadline
Replies: 3
Views: 421

Re: hotspot usernam: deletion of user beyond the deadline

Greetings, I have had this script running for some time friend, paste it as it is in each of the "User Profiles" that you have. :local comment "IN USE" :local userprofile [ip hotspot user get [find where name="$user"] profile] :if ([/ip hotspot user get $user comment]=&...
by eldoncito2019
Sun Feb 11, 2024 7:56 pm
Forum: Scripting
Topic: Help script run at startup to run previous scheduler
Replies: 6
Views: 912

Re: Help script run at startup to run previous scheduler

Friend, why do you want this script, what function does it perform?
by eldoncito2019
Sun Dec 17, 2023 6:17 pm
Forum: Scripting
Topic: reboot - ping down
Replies: 8
Views: 1682

Re: reboot - ping down

Use this:
:if ([/ping 8.8.8.8 count=6] = 0) do={/system reboot [find]}
I hope it helps you.
by eldoncito2019
Sun Dec 10, 2023 2:36 pm
Forum: Beginner Basics
Topic: Hotspot problems
Replies: 0
Views: 1913

Hotspot problems

Hello friends In my community I have a hotspot network to provide internet to members through hotspot, the problem I have is that the "DHCP" assigns another IP to the same MAC and the problem arises that the internet goes down, how do I do it? solve that problem, I'm already almost crazy a...
by eldoncito2019
Sun Dec 10, 2023 1:01 pm
Forum: Scripting
Topic: script for failover swap between 2 link-2ethernet one main and one backup
Replies: 2
Views: 1502

Re: script for failover swap between 2 link-2ethernet one main and one backup

:if ([/ping 1.1.1.1 interface="ether1" count=6]= 0) do={
    /interface enable "ether2"} else={
    /interface disable "ether2"}

For this case I use this, I hope it helps you.
by eldoncito2019
Fri Dec 08, 2023 11:27 pm
Forum: Useful user articles
Topic: HOTSPOT
Replies: 1
Views: 1827

HOTSPOT

I have an RB configured as a hotspot, I have a problem that assigns several IPs to a single MAC address, how do I solve that, thank you for your help.
by eldoncito2019
Fri Dec 08, 2023 11:17 pm
Forum: Scripting
Topic: Looking for a script to update 2 public dynamic IP
Replies: 6
Views: 3582

Re: Looking for a script to update 2 public dynamic IP

:global currentIP
    :local newIP [/ip address get [find where interface="ether2"] address]
    :set newIP [:pick $newIP 0 [:find $newIP "/" -1]]
    :if ($newIP != $currentIP) do={
    :set currentIP $newIP}

I use this script, I hope it helps you friend.
by eldoncito2019
Wed Oct 11, 2023 1:53 pm
Forum: General
Topic: What temperature will the CPU have if my RB indicates the temperature of the PCB?
Replies: 2
Views: 591

Re: What temperature will the CPU have if my RB indicates the temperature of the PCB?

Thanks for the information, do you have a graphic image of your RB?
by eldoncito2019
Wed Oct 11, 2023 1:17 am
Forum: General
Topic: What temperature will the CPU have if my RB indicates the temperature of the PCB?
Replies: 2
Views: 591

What temperature will the CPU have if my RB indicates the temperature of the PCB?

Friends, I have an RB 4011, it indicates the temperature of the PCB, what will be the approximate temperature of the CPU? Thanks for the reply.
by eldoncito2019
Fri Sep 01, 2023 1:51 am
Forum: Scripting
Topic: Script to release/renew WAN IP when offline? [SOLVED]
Replies: 5
Views: 3037

Re: Script to release/renew WAN IP when offline? [SOLVED]

This works very well for me:
:if ([/ping 1.1.1.1 count=6] = 0) do={/ip dhcp-client release [find]}
by eldoncito2019
Sat Aug 26, 2023 12:51 pm
Forum: Scripting
Topic: cant get cpu temperature in script [SOLVED]
Replies: 5
Views: 3239

Re: cant get cpu temperature in script [SOLVED]

REX:
How do I make the script appear in green letters like you do. Thanks for teaching.
by eldoncito2019
Sat Aug 26, 2023 12:49 pm
Forum: Scripting
Topic: Can anyone help me please. I need to Script to disable mikrotik hotpot user when time is up
Replies: 2
Views: 1989

Re: Can anyone help me please. I need to Script to disable mikrotik hotpot user when time is up

I use this script in V 6 :local userprofile [ip hotspot user get [find where name="$user"] profile] :if ([/ip hotspot user get $user comment]="") do={[/ip hotspot user set $user comment=$comment]} [/system scheduler add name=$user on-event="/ip hotspot user remove \"$us...
by eldoncito2019
Fri Aug 25, 2023 1:54 pm
Forum: Scripting
Topic: Enable and disable queue tree [SOLVED]
Replies: 4
Views: 3006

Re: Enable and disable queue tree [SOLVED]

Can anybody help me please
by eldoncito2019
Sun Aug 20, 2023 12:16 pm
Forum: Scripting
Topic: Enable and disable queue tree [SOLVED]
Replies: 4
Views: 3006

Re: Enable and disable queue tree [SOLVED]

to be able to enable or disable all the queue trees, in order to be able to leave all my clients with the free internet or the managed internet.
by eldoncito2019
Sat Aug 19, 2023 1:30 pm
Forum: Scripting
Topic: Enable and disable queue tree [SOLVED]
Replies: 4
Views: 3006

Enable and disable queue tree [SOLVED]

Friends, I turn to you because I know you can help me:
I need to make a script to enable and disable the whole queue tree, and if not it's too much trouble to also enable and disable only one rule in the queue tree, thanks for your valuable help.
by eldoncito2019
Thu Aug 10, 2023 8:41 pm
Forum: Scripting
Topic: BACKUP INTERFACE [SOLVED]
Replies: 6
Views: 2561

Re: BACKUP INTERFACE [SOLVED]

I found the solution:
:if ([/ping 1.1.1.1 interface="ETHERT 1" count=6 ] = 0) do={
/interface enable "ETHERT 2"} else={
/interface disable "ETHERT 2"}

Thanks for the help
by eldoncito2019
Thu Aug 10, 2023 7:51 pm
Forum: Scripting
Topic: BACKUP INTERFACE [SOLVED]
Replies: 6
Views: 2561

Re: BACKUP INTERFACE [SOLVED]

What I want is for the script to ping only interface 1, as I have it, is it okay? Thanks again
by eldoncito2019
Thu Aug 10, 2023 7:49 pm
Forum: Scripting
Topic: BACKUP INTERFACE [SOLVED]
Replies: 6
Views: 2561

Re: BACKUP INTERFACE [SOLVED]

Do you have it as a backup in case the main port doesn't work?
by eldoncito2019
Thu Aug 10, 2023 7:36 pm
Forum: Scripting
Topic: BACKUP INTERFACE [SOLVED]
Replies: 6
Views: 2561

Re: BACKUP INTERFACE [SOLVED]

Thanks for your answer friend, what you sent me is a balance with failover. I need to have another line disabled so that it is activated when the main line goes down, I don't want to balance it, the script is very clear.
by eldoncito2019
Thu Aug 10, 2023 2:02 pm
Forum: Scripting
Topic: BACKUP INTERFACE [SOLVED]
Replies: 6
Views: 2561

BACKUP INTERFACE [SOLVED]

Hello friends, I have the following script: { /interface "ETHERT 1" :if ([/ping 1.1.1.1 count=6] = 0) do={ /interface enable "ETHERT 2"} else={ /interface disable "ETHERT 2"} } What I want to do with the script is that when the "ETHERT 1" interface fails the i...
by eldoncito2019
Sun May 28, 2023 10:25 pm
Forum: Scripting
Topic: Script to disable interface when there is no traffic
Replies: 3
Views: 1686

Script to disable interface when there is no traffic

Friends, I need a script to disable an interface of my RB when it has no traffic. and after a few seconds that interface is re-enabled. Thank you for your cooperation.
by eldoncito2019
Tue May 16, 2023 2:30 am
Forum: Wireless Networking
Topic: SXTsq lite5
Replies: 2
Views: 1086

Re: SXTsq lite5

A wifi configuration from a client, it will be connected at a friend's house, if the other device is also controlled by me
by eldoncito2019
Sun May 14, 2023 11:18 pm
Forum: Wireless Networking
Topic: SXTsq lite5
Replies: 2
Views: 1086

SXTsq lite5

Hello friends, someone has a total configuration of a SXTsq lite5 client mode. Thank you for your help.
by eldoncito2019
Wed Apr 19, 2023 8:40 pm
Forum: Scripting
Topic: a script for monitoring packet loss for ping 10 times
Replies: 17
Views: 16632

Re: a script for monitoring packet loss for ping 10 times

Hi. Try this script. :local ipPing ("8.8.8.8") :local pingip :set pingip [/ping $ipPing count=10] :if ($pingip = 1) do={ :log info ("90% lost") /interface ethernet disable ether1 } else={ /interface ethernet enable ether1 } I need help with a script similar to this one, I use 70...
by eldoncito2019
Fri Apr 07, 2023 9:38 pm
Forum: Scripting
Topic: Send telegram notification
Replies: 3
Views: 1762

Send telegram notification

Friends, I need a script to send notification to telegram, how would it be?
Thanks for the help.
by eldoncito2019
Wed Apr 05, 2023 3:36 am
Forum: Wireless Networking
Topic: DISTANCE IN SECTION ADVANCED
Replies: 12
Views: 1659

Re: DISTANCE IN SECTION ADVANCED

-65 ??
do not touch any.... (the router identity is visible......)
I don't understand what you mean by this friend REX.
by eldoncito2019
Tue Apr 04, 2023 6:53 pm
Forum: Wireless Networking
Topic: DISTANCE IN SECTION ADVANCED
Replies: 12
Views: 1659

Re: DISTANCE IN SECTION ADVANCED

I don't understand REX
by eldoncito2019
Tue Apr 04, 2023 6:41 pm
Forum: Wireless Networking
Topic: DISTANCE IN SECTION ADVANCED
Replies: 12
Views: 1659

Re: DISTANCE IN SECTION ADVANCED

This is my station
What power should I put on my equipment?
by eldoncito2019
Tue Apr 04, 2023 3:47 pm
Forum: Wireless Networking
Topic: DISTANCE IN SECTION ADVANCED
Replies: 12
Views: 1659

Re: DISTANCE IN SECTION ADVANCED

Thanks for your answer friend REX, and for that distance what power do you recommend?
by eldoncito2019
Tue Apr 04, 2023 2:24 pm
Forum: Wireless Networking
Topic: DISTANCE IN SECTION ADVANCED
Replies: 12
Views: 1659

Re: DISTANCE IN SECTION ADVANCED

ROS 6.49.7
by eldoncito2019
Tue Apr 04, 2023 2:06 pm
Forum: Wireless Networking
Topic: DISTANCE IN SECTION ADVANCED
Replies: 12
Views: 1659

DISTANCE IN SECTION ADVANCED

Friends. I am completely new in the configuration of mikrotik equipment wirelessly, how do I set 300 meters or 0.3 km, which is the distance from the AP to my station?
by eldoncito2019
Wed Mar 08, 2023 11:44 am
Forum: Scripting
Topic: Enable and Disable IP addresses in address list [SOLVED]
Replies: 10
Views: 2458

Re: Enable and Disable IP addresses in address list [SOLVED]

It helped me like this, thanks friend REX
{
/ip firewall address-list disable [find where list="test" and address~"10.1.1.2|10.1.1.5|10.1.1.6"]
}
{
/ip firewall address-list enable [find where list="test" and address~"10.1.1.2|10.1.1.5|10.1.1.6"]
}
by eldoncito2019
Tue Mar 07, 2023 7:31 pm
Forum: Scripting
Topic: Enable and Disable IP addresses in address list [SOLVED]
Replies: 10
Views: 2458

Re: Enable and Disable IP addresses in address list [SOLVED]

Thanks for your answer REX, and if I want to enable or disable several IP addresses at the same time, for example, 10.1.1.2, 10.1.1.4, 10.1.1.5, how would it be?
by eldoncito2019
Tue Mar 07, 2023 12:09 pm
Forum: Scripting
Topic: Enable and Disable IP addresses in address list [SOLVED]
Replies: 10
Views: 2458

Re: Enable and Disable IP addresses in address list [SOLVED]

Thanks for your answer friend. but I need the script is like this.
by eldoncito2019
Tue Mar 07, 2023 11:57 am
Forum: Scripting
Topic: Enable and Disable IP addresses in address list [SOLVED]
Replies: 10
Views: 2458

Enable and Disable IP addresses in address list [SOLVED]

Hello friends, could you help me with a script that enables and disables any IP address that is in the address list. very grateful in advance for the help.
by eldoncito2019
Fri Jan 13, 2023 3:32 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

now it is synced
by eldoncito2019
Wed Jan 11, 2023 4:53 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

I'll wait to see what @kangarie responds.
by eldoncito2019
Wed Jan 11, 2023 4:19 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

works, but has a 07-hour advance
by eldoncito2019
Wed Jan 11, 2023 4:05 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

Again the same problem with the URL, does anyone have one please.
by eldoncito2019
Fri Dec 09, 2022 4:58 pm
Forum: General
Topic: Storage size
Replies: 2
Views: 302

Re: Storage size

Thank you.
by eldoncito2019
Fri Dec 09, 2022 3:26 pm
Forum: General
Topic: Storage size
Replies: 2
Views: 302

Storage size

Guys,
Where do I get the storage size and storage type of my Routerboard?
Is a RB 750GL.
by eldoncito2019
Wed Dec 07, 2022 10:11 pm
Forum: Scripting
Topic: Get free HDD space percent [SOLVED]
Replies: 2
Views: 1060

Get free HDD space percent [SOLVED]

I have the following script { /system resource :local totalhdd [get total-hdd-space] :local freehdd [get free-hdd-space] :local percfree ($totalhdd-$freehdd/$totalhdd*100) :put "Free Space: $freehdd" :put "Total Space: $totalhdd" :put ($percfree."% freehdd space") } but...
by eldoncito2019
Sun Nov 27, 2022 3:10 pm
Forum: Scripting
Topic: RECOVER FILE.txt
Replies: 2
Views: 767

Re: RECOVER FILE.txt

mikrotik.jpg

How do I recover even the CREATION TIME of a file already saved in the file list.

Thanks.

I already solved
:put [/file get electric-cut_11-15-20_21-11-2022.txt creation-time]
by eldoncito2019
Tue Nov 22, 2022 3:40 pm
Forum: Scripting
Topic: RECOVER FILE.txt
Replies: 2
Views: 767

RECOVER FILE.txt

Guys,
Can an existing file be recovered on the mikrotik?
by eldoncito2019
Mon Nov 21, 2022 6:53 pm
Forum: Scripting
Topic: send MikroTik Notification via WhatsApp
Replies: 55
Views: 36293

Re: send MikroTik Notification via WhatsApp

{
/system clock
:local itime [get time]
[/tool fetch url="https://api.callmebot.com/whatsapp.php\?phone=+5xxxxxxxxxxx&text=$itime&apikey=2xxxxx" mode=http keep-result=no];
}

Here if it works.
What am I doing wrong?
by eldoncito2019
Mon Nov 21, 2022 6:43 pm
Forum: Scripting
Topic: send MikroTik Notification via WhatsApp
Replies: 55
Views: 36293

Re: send MikroTik Notification via WhatsApp

I plan to use it here { :local intGoff [:tonum [/system clock get gmt-offset]] :if ($intGoff > 86400) do={:set intGoff ($intGoff - 4294967296)} :local epochNow (([/tool fetch url="https://api.kangarie.com/time/str/now" as-value output=user])->"data") # not needed for this url, bu...
by eldoncito2019
Mon Nov 21, 2022 5:29 pm
Forum: Scripting
Topic: send MikroTik Notification via WhatsApp
Replies: 55
Views: 36293

Re: send MikroTik Notification via WhatsApp

search tag # rextended send whatsapp notification I use this for receive notification on WhatsApp: CallMeBot.com for send message, to MY WhatsApp on the phone, The Dude alerts: /log warning "callmebot 392*******: Service [Probe.Name] on [Device.Name] is now [Service.Status] ([Service.ProblemDe...
by eldoncito2019
Thu Nov 17, 2022 3:31 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

Thanks again to @kangarie and @Rextended.
by eldoncito2019
Wed Nov 16, 2022 8:07 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

Someone got a url.
by eldoncito2019
Sun Oct 30, 2022 7:32 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

Guys,
does anyone have any url to calculate in UNIX time.
Thanks for the help.
by eldoncito2019
Wed Oct 26, 2022 11:54 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

REXTENDED,
if the router restarts in the afternoon because it takes the time as if it were in the morning, that is, if the router restarts at 9 am there if it takes the time well (09:00:00), but if it restarts at 3 pm takes the time 03:00:00, what is wrong?

It's 12 hours late.
by eldoncito2019
Thu Oct 20, 2022 4:22 pm
Forum: Scripting
Topic: Script for Daily Uptime Limit for Hotspot users
Replies: 13
Views: 16761

Re: Script for Daily Uptime Limit for Hotspot users

{
 /ip hotspot user reset-counters
}

I hope it will be of great help @joshuanieves32.




EL DONCITO.
by eldoncito2019
Wed Oct 19, 2022 1:06 pm
Forum: Scripting
Topic: with a script can I know when my router synchronizes the internet time?
Replies: 5
Views: 801

Re: with a script can I know when my router synchronizes the internet time?

Is there a way to do it when you sync the time from the cloud





EL DONCITO.
by eldoncito2019
Tue Oct 18, 2022 6:26 pm
Forum: Scripting
Topic: with a script can I know when my router synchronizes the internet time?
Replies: 5
Views: 801

Re: Possible solution

When you use NTP servers to synchronize the time, a message is logged when the time is reset to a different value, which normally happens when you reboot. So configure some NTP servers and optionally remove the cloud time sync. That is where the detail is, I have not been able to configure an NTP s...
by eldoncito2019
Tue Oct 18, 2022 6:04 pm
Forum: Scripting
Topic: with a script can I know when my router synchronizes the internet time?
Replies: 5
Views: 801

with a script can I know when my router synchronizes the internet time?

Guys
with a script can I know when my router synchronizes the internet time?, I ask because when the RB restarts sometimes it takes several minutes to synchronize the correct time, I want to know in the script that exact time. Thanks for replying and helping me.




EL DONCITO.
by eldoncito2019
Sun Oct 16, 2022 1:12 pm
Forum: Scripting
Topic: /terminal style error [SOLVED]
Replies: 1
Views: 747

/terminal style error [SOLVED]

Guys,
I have seen in some scripts that with this command
/terminal style error
the answer appears colored in red, my question is that there are more commands where the answers appear in other colors, if so what are they? Thank you for helping me learn.





EL DONCITO.
by eldoncito2019
Thu Oct 13, 2022 7:37 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

to get current timestamp https://helloacm.com/api/unix-timestamp-converter/?s=now to convert timestamp to date string https://helloacm.com/api/unix-timestamp-converter/?s=1665674782 this is the answer failure: closing connection: <404 Not Found> 104.26.14.89:443 (4) Thanks for your help kangarie, l...
by eldoncito2019
Wed Oct 12, 2022 10:58 pm
Forum: Scripting
Topic: Last link up time [SOLVED]
Replies: 4
Views: 1248

Last link up time [SOLVED]

Guys,
How do I get the "LAST LINK UP TIME"?



mikrotik.jpg




EL DONCITO.
by eldoncito2019
Wed Oct 12, 2022 5:52 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

I understand REX, and you don't have any solution?






EL DONCITO.
by eldoncito2019
Tue Oct 11, 2022 10:14 pm
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Re: Tool fetch url [SOLVED]

Thanks for answering friend REX, and how do I use it in the second call to convert the timestamp to the date, please help me




EL DONCITO.
by eldoncito2019
Tue Oct 11, 2022 2:42 am
Forum: Scripting
Topic: Tool fetch url [SOLVED]
Replies: 27
Views: 4910

Tool fetch url [SOLVED]

I have the following script made by REXTENDED, it hasn't worked for several weeks, the problem is in "https://showcase.api.linx.twenty57.net/UnixTime/tounix\3Fdate=now" the page doesn't work, you can change for another URL, I leave the script { :local intGoff [:tonum [/system clock get gmt...
by eldoncito2019
Mon Oct 10, 2022 6:37 pm
Forum: Scripting
Topic: Backup in a subfolder
Replies: 5
Views: 884

Re: Backup in a subfolder

Solved friend Rextended { :local name "750GL(SERVER)" :local fname "RB" :local backupname "$fname/$name" /ip smb shares :local temp [get [find default=yes] directory] set [find default=yes] directory=$fname set [find default=yes] directory=$temp /export compact file=$ba...
by eldoncito2019
Mon Oct 10, 2022 6:23 pm
Forum: Scripting
Topic: Backup in a subfolder
Replies: 5
Views: 884

Re: Backup in a subfolder

Guys, I'm trying to save a "rsc" backup to a subfolder, and I can't do it, here's my script { :local name "750GL(SERVER)" :local fname "RB" :local backupname "$fname$name" /ip smb shares :local temp [get [find default=yes] directory] set [find default=yes] dir...
by eldoncito2019
Mon Oct 10, 2022 6:18 pm
Forum: Scripting
Topic: Save .rsc file in subfolder
Replies: 1
Views: 416

Save .rsc file in subfolder

Guys, I'm trying to save a "rsc" backup to a subfolder, and I can't do it, here's my script { :local name "750GL(SERVER)" :local fname "RB" :local backupname "$fname$name" /ip smb shares :local temp [get [find default=yes] directory] set [find default=yes] dir...
by eldoncito2019
Tue Oct 04, 2022 10:45 pm
Forum: Scripting
Topic: Changing the MMM/DD/YYYY date format.
Replies: 16
Views: 21539

Re: Changing the MMM/DD/YYYY date format.

I ask because I want to learn more






EL DONCITO.
by eldoncito2019
Tue Oct 04, 2022 1:10 pm
Forum: Scripting
Topic: Changing the MMM/DD/YYYY date format.
Replies: 16
Views: 21539

Re: Changing the MMM/DD/YYYY date format.

REX ...... why create a GLOBAL variable and not place it like this { /system clock :local vdate [get date] :local vtime [get time] :local yyyy [:pick $vdate 7 11] :local M ([:find "xxanebarprayunulgoepctovecANEBARPRAYUNULGOEPCTOVEC" [:pick $vdate 1 3] -1]/2); :if ($M>12) do={:set M ($M - 1...
by eldoncito2019
Sat Oct 01, 2022 12:53 pm
Forum: Scripting
Topic: Script in IP DHCP Client
Replies: 9
Views: 3197

Re: Script in IP DHCP Client

Would this be the endless loop? :local stopRouterRun false :do { :delay 10s } while=(!$stopRouterRun) would there be something like this? :local stopRouterRun false :do { /ip dhcp-client :if ([/ping 1.1.1.1 count=6] = 0) do={/ip dhcp-client release [find]} :delay 10s } while=(!$stopRouterRun) EL DON...
by eldoncito2019
Thu Sep 29, 2022 12:09 am
Forum: Scripting
Topic: Script in IP DHCP Client
Replies: 9
Views: 3197

Re: Script in IP DHCP Client

Just to know if it was possible anything else




EL DONCITO.
by eldoncito2019
Wed Sep 28, 2022 11:30 pm
Forum: Scripting
Topic: Script in IP DHCP Client
Replies: 9
Views: 3197

Re: Script in IP DHCP Client

I would like it to be released when the IP that my isp delivers is down, do you understand me?

Can be done like this?



EL DONCITO.
by eldoncito2019
Wed Sep 28, 2022 10:50 pm
Forum: Scripting
Topic: Script in IP DHCP Client
Replies: 9
Views: 3197

Re: Script in IP DHCP Client

I want it to do the same but set to IP DHCP Client





EL DONCITO.
by eldoncito2019
Wed Sep 28, 2022 4:06 pm
Forum: Scripting
Topic: Script in IP DHCP Client
Replies: 9
Views: 3197

Script in IP DHCP Client

Cheers,
I have this script running in /system scheduler and it does it very well,

:if ([/ping 1.1.1.1 count=6] = 0) do={/ip dhcp-client release [find]}

My question is how do I put it in IP DHCP Client, I can't find how to do it.

IP DHCP CLIENT.jpg

Thanks for your help.




EL DONCITO
by eldoncito2019
Mon Sep 26, 2022 4:07 pm
Forum: General
Topic: Marking of connections
Replies: 1
Views: 282

Marking of connections

To this day, what is the best way to mark connections on YouTube and Facebook. Thanks for the help.






EL DONCITO.
by eldoncito2019
Mon Sep 19, 2022 10:07 pm
Forum: Scripting
Topic: Why the file is not created [SOLVED]
Replies: 11
Views: 1618

Re: Why the file is not created [SOLVED]

The script is working very well friend Rex, how can I send the file before it reaches 4095 bits by mail





EL DONCITO.
by eldoncito2019
Mon Sep 19, 2022 5:53 pm
Forum: Scripting
Topic: Why the file is not created [SOLVED]
Replies: 11
Views: 1618

Re: Why the file is not created [SOLVED]

:global addLogToFile do={ :local filename "$1" :local fileext ".txt" ; # can be only .txt !!! :local maxlen 4095 /file :if ([:len [find where name="flash" and type="disk"]] = 1) do={:set filename "flash/$filename"} :local wkfilename "$filename$...
by eldoncito2019
Mon Sep 19, 2022 5:48 pm
Forum: Scripting
Topic: Why the file is not created [SOLVED]
Replies: 11
Views: 1618

Re: Why the file is not created [SOLVED]

Excuse me friend REX, I did it as you recommended and it's still the same.



EL DONCITO.
by eldoncito2019
Mon Sep 19, 2022 5:13 pm
Forum: Scripting
Topic: Why the file is not created [SOLVED]
Replies: 11
Views: 1618

Re: Why the file is not created [SOLVED]

Thanks REX, in the file write like this.
script1.jpg


But I would like you to write like this, of course if you can.
scrirt2.jpg


EL DONCITO.
by eldoncito2019
Mon Sep 19, 2022 4:02 pm
Forum: Scripting
Topic: Why the file is not created [SOLVED]
Replies: 11
Views: 1618

Re: Why the file is not created [SOLVED]

I can't find where I'm wrong REX, help me please,





EL DONCITO.
by eldoncito2019
Sun Sep 18, 2022 10:13 pm
Forum: Scripting
Topic: Why the file is not created [SOLVED]
Replies: 11
Views: 1618

Why the file is not created [SOLVED]

I am using these scripts made by REXTENDED, I have copied and pasted the same as the original scripts and I cannot find why the file is not created :global addLogToFile do={ :local filename "$1" :local fileext ".txt" :local maxlen 4095 /file :if ([:len [find where name="flas...
by eldoncito2019
Mon Sep 12, 2022 1:29 pm
Forum: Scripting
Topic: INTERFACE MONITOR
Replies: 4
Views: 755

Re: INTERFACE MONITOR

I need it to run only once.




EL DONCITO.
by eldoncito2019
Sun Sep 11, 2022 10:51 pm
Forum: Scripting
Topic: INTERFACE MONITOR
Replies: 4
Views: 755

Re: INTERFACE MONITOR

What would it be like once, and what would it be like forever?
I would like to learn in all possible ways.






EL DONCITO.
by eldoncito2019
Sun Sep 11, 2022 1:55 pm
Forum: Scripting
Topic: INTERFACE MONITOR
Replies: 4
Views: 755

INTERFACE MONITOR

Hello,
How do I print as- value the moritor interface?
Thanks for the help.
:put [/interface monitor "ETHERT 1" print as-value]




EL DONCITO.
by eldoncito2019
Thu Sep 08, 2022 1:25 am
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

Of course I have used them and without any satisfactory answer.

What will happen?




EL DONCITO.
by eldoncito2019
Wed Sep 07, 2022 11:50 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

Any solution to my problem




EL DONCITO.
by eldoncito2019
Wed Sep 07, 2022 6:14 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

TP-LINK.jpg

and this is the TP-LINK.




EL DONCITO.
by eldoncito2019
Wed Sep 07, 2022 6:05 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

NTP.jpg

Here is what appears in my RB



El DONCITO.
by eldoncito2019
Wed Sep 07, 2022 4:45 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

V 6.48.6 (long-term)

Behind the RB750GL I have a TP-LINK router which uses as primary NTP server 190.64.134.53 and secondary 190.15.128.72 and if it synchronizes the time normally

A question how do I post a screenshot in the thread.


EL DONCITO.
by eldoncito2019
Wed Sep 07, 2022 3:54 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

I did what you told me and this appears




enabled: yes
primary-ntp: 201.217.3.85
secondary-ntp: 190.15.135.40
server-dns-names:
mode: unicast
poll-interval: 16s
active-server: 190.15.135.40




EL DONCITO.
by eldoncito2019
Wed Sep 07, 2022 12:49 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

What do you get from this command in v6 and v7 /system ntp client print /system ntp client> /system ntp client print enabled: yes primary-ntp: 177.91.160.90 secondary-ntp: 200.160.7.186 server-dns-names: mode: unicast poll-interval: 16s active-server: 200.160.7.186 EL DONCITO.
by eldoncito2019
Wed Sep 07, 2022 4:19 am
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

This is my configuration # sep/06/2022 21:15:47 by RouterOS 6.48.6 # software id = F6M9-CKU1 # # model = 750GL # serial number = 3B0502AB4175 /interface bridge add comment="ETHERT 3 - 5" fast-forward=no name=PUENTE /interface ethernet set [ find default-name=ether1 ] name="ETHERT 1&qu...
by eldoncito2019
Wed Sep 07, 2022 2:23 am
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

And how do i solve it?



EL DONCITO.
by eldoncito2019
Tue Sep 06, 2022 11:02 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

My RB has problems synchronizing the time in the NTP server, that's why I want to downgrade to another version, do you understand me?




EL DONCITO.
by eldoncito2019
Tue Sep 06, 2022 9:30 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

Friends, what version of WINBOX should I use to be able to downgrade to V 6.40 of my Roterboard?





EL DONCITO.
by eldoncito2019
Tue Sep 06, 2022 4:46 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

Re: How do I download previous versions of WINBOX?

I want to downgrade my RB and leave it in version 6.40,

What is the version of winbox to use?




EL DONCITO.
by eldoncito2019
Tue Sep 06, 2022 1:03 pm
Forum: General
Topic: NTP do not work - (ex: How do I download previous versions of WINBOX?)
Replies: 30
Views: 2002

NTP do not work - (ex: How do I download previous versions of WINBOX?)

Sirs,
How do I download previous versions of WINBOX?
Thanks for your help.



EL DONCITO.
by eldoncito2019
Sat Sep 03, 2022 7:03 pm
Forum: Scripting
Topic: Enable MAC ADDRESS in IP BINDING
Replies: 4
Views: 1209

Re: Enable MAC ADDRESS in IP BINDING

I have this:
/ip dhcp-server
:foreach item in=[lease find] do={
    :local mac [lease get $item mac-address]
    /ip hotspot ip-binding
    :if ([:len [find where mac-address=$mac]] = 1) do={
        /ip hotspot ip-binding disable [find mac-address="$mac"]
    }
}



EL DONCITO.
by eldoncito2019
Fri Sep 02, 2022 8:58 pm
Forum: Scripting
Topic: Enable MAC ADDRESS in IP BINDING
Replies: 4
Views: 1209

Re: Enable MAC ADDRESS in IP BINDING

What I want to do is that if with your script I have the following mac XX:XX:XX:XX:XX:XX disabled, because the client may be circumventing the captive portal, when he contracts my hotspot and connects with that mac the script enable the mac XX:XX:XX:XX:XX, do you understand me?



EL DONCITO.
by eldoncito2019
Fri Sep 02, 2022 4:31 pm
Forum: Scripting
Topic: Enable MAC ADDRESS in IP BINDING
Replies: 4
Views: 1209

Enable MAC ADDRESS in IP BINDING

This script did it for my REXTENDEX /ip hotspot :foreach item in=[host find] do={ :local mac [host get $item mac-address] :local svr [host get $item server] ip-binding :if ([:len [find where mac-address=$mac and server=$svr]] = 0) do={ add mac-address=$mac server=$svr type=blocked disabled=yes } } a...
by eldoncito2019
Fri Sep 02, 2022 12:02 am
Forum: Scripting
Topic: IP HOTSPOT HOST [SOLVED]
Replies: 4
Views: 1310

Re: IP HOTSPOT HOST [SOLVED]

Thanks friend REX; How do I copy the mac address in IP BINDING?




EL DONCITO.
by eldoncito2019
Thu Sep 01, 2022 7:59 pm
Forum: Scripting
Topic: IP HOTSPOT HOST [SOLVED]
Replies: 4
Views: 1310

IP HOTSPOT HOST [SOLVED]

Friend, if I put this:
:put  [/ip hotspot host print as value]

I only want to print the "MAC ADDRESS", how do I do it?



EL DONCITO.
by eldoncito2019
Wed Aug 31, 2022 6:35 pm
Forum: Announcements
Topic: v6.49.6 [stable] is released!
Replies: 56
Views: 85254

Re: v6.49.6 [stable] is released!

There will be no more updates in version 6? Do I have to go to version 7?
EL DONCITO.
by eldoncito2019
Wed Aug 31, 2022 1:33 pm
Forum: General
Topic: CONFIGURE SWITCH IN V-6.49.6
Replies: 1
Views: 244

CONFIGURE SWITCH IN V-6.49.6

Friends,
You have a manual to configure some ports of my RB as a switch, I appreciate your help.




EL DONCITO.
by eldoncito2019
Mon Aug 29, 2022 2:39 pm
Forum: Scripting
Topic: Enable / disable "mac" address in the "HOSTS" section of the HOTSPOT
Replies: 2
Views: 560

Enable / disable "mac" address in the "HOSTS" section of the HOTSPOT

Guys,
I need a script to enable and disable some mac addresses that are appearing in the hosts section of my RB hotspot, but by disabling them if for some reason I need to enable them again when the "USER" is activated this mac address can let the user navigate in the hotspot



EL DONCITO.
by eldoncito2019
Sat Aug 27, 2022 7:56 pm
Forum: General
Topic: Uninstall package [SOLVED]
Replies: 3
Views: 894

Uninstall package [SOLVED]

I want to uninstall the "NTP" package, I have version 6.49.6, how to uninstall it. Thanks for helping





EL DONCITO.
by eldoncito2019
Fri Aug 19, 2022 1:55 pm
Forum: Scripting
Topic: LTE device disonnecting [SOLVED]
Replies: 6
Views: 1414

Re: LTE device disonnecting [SOLVED]

:if ([/ping 8.8.8.8 count=5] = 0) do={/system reboot}



EL DONCITO.
by eldoncito2019
Mon Aug 08, 2022 10:48 pm
Forum: Scripting
Topic: Ip firewall address list to Global variable
Replies: 1
Views: 620

Ip firewall address list to Global variable

friends,
I have a provider that provides dynamic IP addresses,
i want to save the ip if dynamic ip address is changed in ip firewall addres list and then restore that ip as a global variable on reboot




EL DONCITO.
by eldoncito2019
Mon Aug 08, 2022 9:17 pm
Forum: Scripting
Topic: Persistent Environment Variables [SOLVED]
Replies: 50
Views: 37096

Re: Persistent Environment Variables [SOLVED]

and if i want to save an ip variable in ip firewall address list and then restore it back on reboot?
by eldoncito2019
Wed Aug 03, 2022 4:34 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

I already found the solution:
:local userprofile [ip hotspot user get [find where name="$user"] profile]
 interval= [/ip hotspot user profile get [find where name="$userprofile"] mac-cookie-timeout]]

Thanks everyone for your help.


EL DONCITO.
by eldoncito2019
Mon Aug 01, 2022 12:59 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

In my hotspot I have several user profiles, I want to create a script that looks for a name of the ones in the USER PROFILE
Give me an idea and I'll see how I can adapt it to my needs.

[/ip hotspot user profile get [find where name="$user profile"] mac-cookie-timeout]]


EL DONCITO.
by eldoncito2019
Mon Aug 01, 2022 12:20 am
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

Please give me an idea, something to guide me.



EL DONCITO.
by eldoncito2019
Sun Jul 31, 2022 11:07 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

In my hotspot I have several user profiles, I want to create a script that looks for a name of the ones in the USER PROFILE

Give me an idea and I'll see how I can adapt it to my needs.



EL DONCITO.
by eldoncito2019
Thu Jul 28, 2022 4:47 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

How do I find a user profile that exists in my hotspot's user profile?



EL DONCITO.
by eldoncito2019
Thu Jul 28, 2022 2:02 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

I have a hotspot with multiple user profiles, if I use this command :foreach id in=[/ip hotspot user profile find] do={ {... {... :local UserName [/ip hotspot user profile get $id name] {... {... :put $UserName {... } default 30min 1hour TEST name all the user profiles I have on the hotspot. please ...
by eldoncito2019
Wed Jul 27, 2022 11:36 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

Give me an example.
Give me an idea.



EL DONCITO.
by eldoncito2019
Wed Jul 27, 2022 9:46 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

How do I do this that you say?




EL DONCITO.
by eldoncito2019
Wed Jul 27, 2022 5:20 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

What I want is for you to tell me how I can find a user profile, but only find one, not all the user profiles, give me an idea and I'll fix it. Thanks.



EL DONCITO.
by eldoncito2019
Wed Jul 27, 2022 12:38 am
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

the result is the same as with this
:foreach i in=[/ip hotspot user profile find] do={
  :put "$[/ip hotspot user profile get $i name]";
}


EL DONCITO.
by eldoncito2019
Tue Jul 26, 2022 10:14 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

I want to find each user separately to put it in the following script that I am doing :local atime [ /system clock get time ] :local adate [ /system clock get date ] :local comment "$user conected : $adate at: $atime" :if ([ /ip hotspot user get $user comment ]="") do={ [ /ip hot...
by eldoncito2019
Tue Jul 26, 2022 8:45 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

Friends, sorry for so much trouble, I found this searching here in the forum :foreach i in=[/ip hotspot user profile find] do={ :put "$[/ip hotspot user profile get $i name]"; } that gives me all the names of my user profiles, how do I create a command that only gives me a single user prof...
by eldoncito2019
Sun Jul 24, 2022 10:55 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

Don't give up guys yet, how do I create a command to find the user profile "XXXX" and store it as a variable?




EL DONCITO.
by eldoncito2019
Sun Jul 24, 2022 3:59 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

Nothing JOTNE?



EL DONCITO.
by eldoncito2019
Sat Jul 23, 2022 12:50 am
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

:local atime [ /system clock get time ] :local adate [ /system clock get date ] :local comment "$user conected : $adate at: $atime" :if ([ /ip hotspot user get $user comment ]="") do={ [ /ip hotspot user set $user comment=$comment ] } [/system scheduler add name=$user on-event=&...
by eldoncito2019
Fri Jul 22, 2022 9:52 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

No friend, I want to find the USER PROFILE and automatically write it in the name of the previous command.


EL DONCITO.
by eldoncito2019
Fri Jul 22, 2022 2:58 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

Exactly, what I want is to place in the previous command something that automatically assigns the name of the USER PROFILE.


EL DONCITO.
by eldoncito2019
Fri Jul 22, 2022 1:21 pm
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

Re: USER PROFILE [SOLVED]

Thanks for answering friend JOTNE, what I want is for the script to copy the name of the USER PROFILE where the NAME is in this line [/ip hotspot user profile get [find where name="XXXX"]] mac-cookie-timeout]] I have a USER PROFILE with the name "XXXX" and I want that name to be ...
by eldoncito2019
Fri Jul 22, 2022 1:48 am
Forum: Scripting
Topic: USER PROFILE [SOLVED]
Replies: 35
Views: 4558

USER PROFILE [SOLVED]

Hello everyone, friends, I have a user profile "XXXX", how do I make it copy automatically in this line:

[/ip hotspot user profile get [find where name="XXXX"] mac-cookie-timeout]]

Thanks for your help.


EL DONCITO.
by eldoncito2019
Fri Jul 22, 2022 12:11 am
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

I already solved

[/ip hotspot user profile get [find where name="XXXX"] mac-cookie-timeout]

Thanks everyone for your help.


EL DONCITO.
by eldoncito2019
Thu Jul 21, 2022 2:09 am
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

I need your help please.
 interval=[/ip hotspot user profile find  mac-cookie-timeout name=""]


EL DONCITO.
by eldoncito2019
Tue Jul 19, 2022 10:52 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

Can anybody help me?







EL DONCITO.
by eldoncito2019
Tue Jul 19, 2022 5:23 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

Friends, how do I write the mac cookie timeout in interval of this script and also in interval: add address-pool=dhcp_pool0 keepalive-timeout=5s mac-cookie-timeout=4h name=2hours on-login=":local time [/ip hotspot user profile get mac-cookie-timeput] ]\r\ \n:local atime [ /system clock get time...
by eldoncito2019
Mon Jul 18, 2022 4:39 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

I speak Spanish and my English is through the google translator, this is one of the user profiles that I use: add address-pool=dhcp_pool0 keepalive-timeout=5s mac-cookie-timeout=4h name=2hours on-login=":local time 4h\r\ \n:local atime [ /system clock get time ]\r\ \n:local adate [ /system cloc...
by eldoncito2019
Mon Jul 18, 2022 1:40 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

and then how do we delete the expired user.....
I don't understand anything.




EL DONCITO.
by eldoncito2019
Mon Jul 18, 2022 4:20 am
Forum: Scripting
Topic: Hotspot cookie/active problem
Replies: 17
Views: 3659

Re: Hotspot cookie/active problem

and where is this placed?


EL DONCITO.
by eldoncito2019
Mon Jul 18, 2022 4:01 am
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

ok REX, great job, but what about this part of the script [/system scheduler add name=$user on-event="/ip hotspot user remove \"$user\" \r\ \n/ip hotspot cookie remove [find user=\"$user\"] \r\ \n/system scheduler remove [find name=\"$user\"] \r\ \n\r\ " start...
by eldoncito2019
Sat Jul 16, 2022 7:24 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

Sure friend REX, anyway here I have the script that you made for me days ago :local file "firtsstartup.txt" :local intGoff [:tonum [/system clock get gmt-offset]] :if ($intGoff > 86400) do={:set intGoff ((4294967296 - $intGoff) * -1)} :local epochNow (([/tool fetch url="https://helloa...
by eldoncito2019
Sat Jul 16, 2022 7:04 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

This is what I don't understand, how do I scropt using this?: (Do not put the date and time in the comment, but use the script I already made for you to get the current Unix Epoch, adding the seconds that the user can navigate. Whenever the event fires, it reads the current Epoch and closes all user...
by eldoncito2019
Sat Jul 16, 2022 6:45 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

I already did it friend REX, but you say that I'm wrong in this way, what would be the correct way to avoid problems?




EL DONCITO.
by eldoncito2019
Sat Jul 16, 2022 6:25 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Re: Hotspot [SOLVED]

Thanks for your answer friend Rextended, but I didn't understand anything.





EL DONCITO.
by eldoncito2019
Sat Jul 16, 2022 4:54 pm
Forum: Scripting
Topic: Hotspot [SOLVED]
Replies: 18
Views: 2387

Hotspot [SOLVED]

Greetings friends, I have the following script :local time 6m :local atime [ /system clock get time ] :local adate [ /system clock get date ] :local comment "$user conect: $adate at: $atime" :local thours ($atime + $time) :if ([ /ip hotspot user get $user comment ]="") do={ [ /ip...
by eldoncito2019
Tue Jul 12, 2022 6:29 pm
Forum: Scripting
Topic: Gave my internet log
Replies: 0
Views: 517

Gave my internet log

Hello friends, with
/interface monitor-traffic "ETHERT 1"
I have internet measurement in real time
Could you help me to make a script that registers the internet speed from time to time, thanks for your help.




EL DONCITO
by eldoncito2019
Thu Jun 30, 2022 10:20 pm
Forum: Scripting
Topic: JOBS section of the script list
Replies: 5
Views: 1303

Re: JOBS section of the script list

I did what you told me friend REXTENDED, and it didn't work, when the IP changes 2 times, the script stops working, is that because? Because what I want to do is that every time the routerboard is restarted, the script starts, it takes 15 min, after those 15 min the script is executed and it is runn...
by eldoncito2019
Thu Jun 30, 2022 12:05 am
Forum: Scripting
Topic: JOBS section of the script list
Replies: 5
Views: 1303

Re: JOBS section of the script list

Ok rextendex, but doesn't that make the routerboard have more consumption in the CPU or memory?



EL DONCITO.
by eldoncito2019
Wed Jun 29, 2022 10:53 pm
Forum: Scripting
Topic: JOBS section of the script list
Replies: 5
Views: 1303

JOBS section of the script list

I have this script where all the "GLOBAL VARIABLES" are already declared in other scripts, therefore I consider that I should not declare it again, which I do not understand because the script is executed only once or twice and it no longer appears in the JOBS section, what would be wrong?...
by eldoncito2019
Sat Jun 25, 2022 4:05 pm
Forum: Scripting
Topic: script to delete hotspot users after reaching uptime
Replies: 14
Views: 5455

Re: script to delete hotspot users after reaching uptime

I hope this helps:


/ip hotspot user remove [find uptime=01:00:00 limit-uptime=01:00:00]




EL DONCITO.
by eldoncito2019
Mon Jun 20, 2022 10:45 pm
Forum: General
Topic: MEMORY IN ROUTERBOARD
Replies: 11
Views: 981

Re: MEMORY IN ROUTERBOARD

Someone directly from mikrotik should clarify this.





EL DONCITO.
by eldoncito2019
Sun Jun 19, 2022 6:03 pm
Forum: General
Topic: MEMORY IN ROUTERBOARD
Replies: 11
Views: 981

Re: MEMORY IN ROUTERBOARD

they recommend me to update to the version 7
I doubt that anyone recommended you to upgrade to v7.
Why is it not recommended to upgrade to version 7?
Then why did they do it, but is it advisable to use it?




EL DONCITO.
by eldoncito2019
Sun Jun 19, 2022 3:44 pm
Forum: General
Topic: MEMORY IN ROUTERBOARD
Replies: 11
Views: 981

MEMORY IN ROUTERBOARD

I have a RB750GL with 64MB of memory, in version 5.X.X it had approximately 50MB free, in version 6.X.X it has approximately 42MB free, and in version 7.X.X it only has 25MB free, they recommend me to update to the version 7, knowing that I have so little free memory? Thanks for your reply. EL DONCI...
by eldoncito2019
Sat Jun 18, 2022 4:31 pm
Forum: Scripting
Topic: Drag file to desktop. [SOLVED]
Replies: 1
Views: 910

Drag file to desktop. [SOLVED]

Friends, I have this script that my friend REXTENDED made for me: :delay 10s :global arrMonths {jan="01";feb="02";mar="03";apr="04";may="05";jun="06";jul="07";aug="08";sep="09";oct="10";nov="11&q...
by eldoncito2019
Tue Jun 07, 2022 2:24 am
Forum: Scripting
Topic: script that tells how fast the internet is at X moment
Replies: 6
Views: 1406

Re: script that tells how fast the internet is at X moment

But how do certain things come to your mind?
And where do you store it, in the NAND/Flash memory of the RouterBOARD? If you do that, after a few weeks you throw the RouterBOARD away...


Who said that in a few weeks he would throw it away, please help me rextended.



EL DONCITO.
by eldoncito2019
Mon Jun 06, 2022 11:26 pm
Forum: Scripting
Topic: script that tells how fast the internet is at X moment
Replies: 6
Views: 1406

script that tells how fast the internet is at X moment

Greetings to all,
Can you help me create a script that tells how fast the internet is at X moment?




EL DONCITO.
by eldoncito2019
Sat Jun 04, 2022 5:17 pm
Forum: Scripting
Topic: Expire users a after number of days Stops Work after Upgrade to v.6.33rc11
Replies: 20
Views: 6686

Re: Expire users a after number of days Stops Work after Upgrade to v.6.33rc11

Sorry is this: { :local tdias 0 :local atime [ /system clock get time ] :local adate [ /system clock get date ] :local temp1 [:pick $adate 0 3] :local temp2 [:pick $adate 4 6] :local temp3 [:pick $atime 0 5] :local temp4 ($temp2."/".$temp1." - ".$temp3." Dias: ".$tdias)...
by eldoncito2019
Sat Jun 04, 2022 4:53 pm
Forum: Scripting
Topic: Expire users a after number of days Stops Work after Upgrade to v.6.33rc11
Replies: 20
Views: 6686

Re: Expire users a after number of days Stops Work after Upgrade to v.6.33rc11

Friends, I found this script and I hope it will help someone: :local mdays {31;28;31;30;31;30;31;31;30;31;30;31} :local months {"jan"=1;"feb"=2;"mar"=3;"apr"=4;"may"=5;"jun"=6;"jul"=7;"aug"=8;"sep"=9;"oct&...
by eldoncito2019
Tue May 31, 2022 12:13 am
Forum: Scripting
Topic: Hotspot user
Replies: 4
Views: 900

Re: Hotspot user

Friend rextended I know you will still be celebrating the victory of REAL MADRID, but give the script a review and let me know please.





EL DONCITO.
by eldoncito2019
Sun May 29, 2022 8:16 pm
Forum: Scripting
Topic: Hotspot user
Replies: 4
Views: 900

Re: Hotspot user

Nobody thinks anything?
Help me please.




EL DONCITO.
by eldoncito2019
Sat May 28, 2022 5:36 pm
Forum: Scripting
Topic: Hotspot user
Replies: 4
Views: 900

Re: Hotspot user

Got this: { :local tdias 0 :local atime [ /system clock get time ] :local adate [ /system clock get date ] :local temp1 [:pick $adate 0 3] :local temp2 [:pick $adate 4 6] :local temp3 [:pick $atime 0 5] :local temp4 ($temp2."/".$temp1." - ".$temp3." Dias: ".$tdias); :lo...
by eldoncito2019
Sat May 28, 2022 4:15 pm
Forum: Scripting
Topic: Hotspot user
Replies: 4
Views: 900

Re: Hotspot user

Rextended, you can help.
by eldoncito2019
Sat May 28, 2022 3:22 am
Forum: Scripting
Topic: Hotspot user
Replies: 4
Views: 900

Hotspot user

Greetings friends, I am just starting with a hotspot and I would like to make a script to eliminate users who have the time of one hour, but have been disconnected and before the time and do not connect after 4 hours delete those users, I don't know if you understand me, here I have a script that I ...
by eldoncito2019
Wed May 25, 2022 7:54 pm
Forum: Scripting
Topic: Using "do and else" in script. [SOLVED]
Replies: 14
Views: 2551

Re: Using "do and else" in script. [SOLVED]

Currently, the mode of transportation is clearly still a push buggy. :lol:
I do not understand. LOL :?



EL DONCITO.
by eldoncito2019
Wed May 25, 2022 5:41 pm
Forum: Scripting
Topic: Using "do and else" in script. [SOLVED]
Replies: 14
Views: 2551

Re: Using "do and else" in script. [SOLVED]

I solved it like this I hope you are well: :global stopRouterRun false :do { :local time [/system clock get time] :if ($time >= 18:31:00 and $time <= 18:31:10) do={:put ("$time dinner time")} :delay 1s } while=(!$stopRouterRun) But I have another question, how do I do it in the terminal so...
by eldoncito2019
Wed May 25, 2022 5:24 pm
Forum: Scripting
Topic: Using "do and else" in script. [SOLVED]
Replies: 14
Views: 2551

Re: Using "do and else" in script. [SOLVED]

Very good REX, I'm learning about script, and if I just want the script to run like this: :global stopRouterRun false :do { :local time [/system clock get time] :if ($time >= 12:00:00 and $time <= 12:30:00) do={:set message ("$time dinner time")} :put $message :delay 1s } while=(!$stopRout...
by eldoncito2019
Wed May 25, 2022 4:24 am
Forum: Scripting
Topic: Using "do and else" in script. [SOLVED]
Replies: 14
Views: 2551

Re: Using "do and else" in script. [SOLVED]

:global stopRouterRun false :do { :local time [/system clock get time] :local message ("$time after dinner") :if ($time >= 21:22:00 and $time <= 21:22:10) do={:set message ("$time dinner time")} :if ($time > "21:22:10") do={:set message ("$time before dinner"...
by eldoncito2019
Wed May 25, 2022 12:20 am
Forum: Scripting
Topic: Using "do and else" in script. [SOLVED]
Replies: 14
Views: 2551

Re: Using "do and else" in script. [SOLVED]

I'm slowly learning to use the functions, just that, but the script doesn't work if I run it every second. Can you help me, here is the script: :global stopRouterRun false :do { :local time [/system clock get time] :if ($time < "17:14:00" || $time = "17:14:10") do={:put "get...
by eldoncito2019
Tue May 24, 2022 11:58 pm
Forum: Scripting
Topic: Using "do and else" in script. [SOLVED]
Replies: 14
Views: 2551

Re: Using "do and else" in script. [SOLVED]

It will be like this with 2 if: :local time [/system clock get time] :if ($time <= "18:00:00" || $time = "19:00:00") do={:put "get ready for dinner"} else={:put "it's dinner time"} :if ($time > "19:00:00") do={:put ("to rest dinner"} EL DON...
by eldoncito2019
Tue May 24, 2022 9:44 pm
Forum: Scripting
Topic: Using "do and else" in script. [SOLVED]
Replies: 14
Views: 2551

Using "do and else" in script. [SOLVED]

I'm trying to make a script that does the following: before 18:00:00, it tells me "get ready for dinner" between 18:00:00 and 19:00:00, it tells me "it's dinner time" "and that after 19:00:00, it tells me "to rest dinner", is this possible, here is my script: { :lo...
by eldoncito2019
Mon May 23, 2022 6:00 pm
Forum: Scripting
Topic: Automate Script [SOLVED]
Replies: 12
Views: 2004

Re: Automate Script [SOLVED]

Very grateful for the explanation REX.



EL DONCITO
by eldoncito2019
Mon May 23, 2022 5:22 pm
Forum: Scripting
Topic: Automate Script [SOLVED]
Replies: 12
Views: 2004

Re: Automate Script [SOLVED]

Ok, I understand, but if I want to use the variable that already exists in the first script, how would I do it in the second?



EL DONCITO.
by eldoncito2019
Mon May 23, 2022 4:20 pm
Forum: Scripting
Topic: Automate Script [SOLVED]
Replies: 12
Views: 2004

Re: Automate Script [SOLVED]

Friend REX, the script is working very well thanks for that, just one question: if I already have another script working very well and it has a global variable, how do I make that global variable that already exists in another script this new script use it and we do not have to add it again, I leave...
by eldoncito2019
Sat May 21, 2022 11:31 pm
Forum: Scripting
Topic: Automate Script [SOLVED]
Replies: 12
Views: 2004

Re: Automate Script [SOLVED]

Remember that if it starts automatically,
overwrites the file and you lost the "so precious" time ...


You hit the nail on the head, I don't want to waste "so precious time", how would we do then?



EL DONCITO.
by eldoncito2019
Sat May 21, 2022 11:17 pm
Forum: Scripting
Topic: Automate Script [SOLVED]
Replies: 12
Views: 2004

Re: Automate Script [SOLVED]

This script is to know at what time the routerboard stops working because there is a power outage, so I have to start it manually.







EL DONCITO
by eldoncito2019
Sat May 21, 2022 11:11 pm
Forum: Scripting
Topic: Automate Script [SOLVED]
Replies: 12
Views: 2004

Automate Script [SOLVED]

Hello people, I have the following script which works very well but, what things are never missing a but, I have it in the script section and I have to put it to work manually every time my routerboard restarts, is there any way to put it to work automatically from scheduler or something every time ...
by eldoncito2019
Mon May 16, 2022 12:07 am
Forum: Scripting
Topic: Write to a .txt file
Replies: 5
Views: 2044

Re: Write to a .txt file

This is the 'checkIP' script that I use, scheduled to run every 5 minutes. :global actualIP; :local newIP [/ip address get [find interface="ether1"] address]; :if ($newIP != $actualIP) do={ :put "ip address $actualIP changed to $newIP"; :set actualIP $newIP; /system script run T...
by eldoncito2019
Tue May 10, 2022 10:54 pm
Forum: Scripting
Topic: Persistent Environment Variables [SOLVED]
Replies: 50
Views: 37096

Re: Persistent Environment Variables [SOLVED]

ok.







EL DONCITO.
by eldoncito2019
Tue May 10, 2022 7:23 pm
Forum: Scripting
Topic: Persistent Environment Variables [SOLVED]
Replies: 50
Views: 37096

Re: Persistent Environment Variables [SOLVED]

Your script works very well friend REX, the only thing is that how could it be removed from the LOG so that it does not register every time the variables are saved in the LAYER 7





EL DONCITO.
by eldoncito2019
Mon May 09, 2022 6:58 pm
Forum: Scripting
Topic: UNDERSTANDING SCRIPT
Replies: 1
Views: 603

UNDERSTANDING SCRIPT

How do I make this script :global currentdate { :local newdate "06-05-2022" :if ($newdate => $currentdate) do= {:put "the new date is minor"} else={:put "the new date is major"} :delay 2 set currentdate $newdate } write if the new date is minor than the current date &qu...
by eldoncito2019
Mon May 09, 2022 4:42 pm
Forum: Scripting
Topic: Help with this script
Replies: 7
Views: 991

Re: Help with this script

You are right, what language does ROUTEROS use, or tell me where I can get material to document myself in script programming for mikrotik friend.





EL DONCITO.
by eldoncito2019
Mon May 09, 2022 2:03 pm
Forum: Scripting
Topic: Help with this script
Replies: 7
Views: 991

Re: Help with this script

Help me friend REX, please








EL DONCITO.
by eldoncito2019
Sat May 07, 2022 11:12 pm
Forum: Scripting
Topic: Help with this script
Replies: 7
Views: 991

Re: Help with this script

Ja ja ja ja, no friend REX, it's just to have a record in a file of when the electricity is cut off and when the service is restored, please help me friend REX.











EL DONCITO.
by eldoncito2019
Sat May 07, 2022 10:41 pm
Forum: Scripting
Topic: Help with this script
Replies: 7
Views: 991

Re: Help with this script

**************************** ***************************** DATE: 07/05/2022 COURT: 07/05/2022 TIME: 01:50:48 PM AT: 08:05:30 AM **************************** **************************** I would like to make a record of the courts and the reestablishment of the electrical service as seen in the prev...
by eldoncito2019
Sat May 07, 2022 8:31 pm
Forum: Scripting
Topic: Help with this script
Replies: 7
Views: 991

Help with this script

Hello friends, I have the following scripts that work very well separately, but I would like to make only one and thus be able to keep a record in the file.txt, I don't know if they understand what I want to do. Thank you in advance for your help. :global stopRouterRun false :do { :local file "...
by eldoncito2019
Sat May 07, 2022 3:48 pm
Forum: Scripting
Topic: Where to put /file [SOLVED]
Replies: 2
Views: 1014

Re: Where to put /file [SOLVED]

Than you REX.




EL DONCITO.
by eldoncito2019
Sat May 07, 2022 12:07 am
Forum: Scripting
Topic: Where to put /file [SOLVED]
Replies: 2
Views: 1014

Where to put /file [SOLVED]

Hi friends, I know this question is somewhat ridiculous for you who know a lot about scripting, but where would I put the /file in this line: { :local file "XXXXXX.txt" /file :if ([:len [find where name=$file]] = 0) do={print file=$file; :delay 5s; set $file contents=""} I want t...
by eldoncito2019
Wed May 04, 2022 8:02 pm
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

Try to open the page used for the service:
https://helloacm.com/

Is not mine, if do not work, you must wait than it come back.


REX and there is no other page?, or another way that is not with a page.
For example this: "http://worldclockapi.com/api/json/vst/now\""




EL DONCITO.
by eldoncito2019
Wed May 04, 2022 1:38 pm
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

OK, and tell me one last thing, should I set the script to start when the ROUTERBOARD starts?







EL DONCITO.
by eldoncito2019
Wed May 04, 2022 3:28 am
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

REX friend, why does this appear when I execute the script in the console?

failure: connection timeout
by eldoncito2019
Tue May 03, 2022 3:26 pm
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

Eres mi "PANA" REX.





EL DONCITO.
by eldoncito2019
Tue May 03, 2022 3:14 pm
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

Thank you very much friend REX as we say here in my country, Thank you my "PANA".







EL DONCITO.
by eldoncito2019
Tue May 03, 2022 3:02 pm
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

Help me please friend REX

This is my last question for now.





EL DONCITO.
by eldoncito2019
Tue May 03, 2022 2:52 pm
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

REX friend don't be selfish with me, tell me how I can change.
And I don't bother you anymore for now.



2022-05-02

02-05-2022



EL DONCITO
by eldoncito2019
Tue May 03, 2022 4:10 am
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

Grateful for your help friend Rextended, and sorry for so much trouble but the date instead of being in the YY-MM-DD format, you could change it to DD-MM-YY.



RouterBOARD is started 2022-05-02 12:36:45
RouterBOARD is started 02-05-2022 12:36:45.
by eldoncito2019
Sun May 01, 2022 10:58 pm
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Re: Convert uptime to date and time [SOLVED]

Thanks for answering JOTNE, convert 5w3d13:35:38 in the time and date the routerboard was rebooted.







EL DONCITO.
by eldoncito2019
Sun May 01, 2022 8:57 pm
Forum: Scripting
Topic: Convert uptime to date and time [SOLVED]
Replies: 46
Views: 9096

Convert uptime to date and time [SOLVED]

Greetings to all and Happy Labor Day, there is the possibility that with a script you can convert the UPTIME of a routerboard in the time and date of for example this:

1w 3d 13:42:38.





EL DONCITO.
by eldoncito2019
Thu Apr 28, 2022 12:45 am
Forum: Scripting
Topic: Join two scripts
Replies: 10
Views: 957

Re: Join two scripts

ok, what if the local variable newIP is placed instead as :global newIP?





EL DONCITO.
by eldoncito2019
Wed Apr 27, 2022 11:05 pm
Forum: Scripting
Topic: Join two scripts
Replies: 10
Views: 957

Re: Join two scripts

REXTENDED, how would you solve that?







EL DONCITO.
by eldoncito2019
Wed Apr 27, 2022 10:46 pm
Forum: Scripting
Topic: Join two scripts
Replies: 10
Views: 957

Re: Join two scripts

I don't understand, do you mean that the same global variable currentIP cannot be held by both scripts? and that one of the 2 scripts must have a global variable such as :global storedIP





EL DONCITO.
by eldoncito2019
Wed Apr 27, 2022 10:34 pm
Forum: Scripting
Topic: Join two scripts
Replies: 10
Views: 957

Re: Join two scripts

Thanks for your answer friend REXTENDED, but I just realized that if I have both scripts running at the same time, the one that sends the new IP to the mail does work and the one that registers the new IP in the file.txt does not work, what will happen there?.





EL DONCITO.
by eldoncito2019
Wed Apr 27, 2022 4:24 pm
Forum: Scripting
Topic: Join two scripts
Replies: 10
Views: 957

Re: Join two scripts

Thanks for responding friend, I need a single script to send me the new IP address to my email and at the same time register the new IP in the file.txt. You understand me?.




EL DONCITO.
by eldoncito2019
Wed Apr 27, 2022 4:02 pm
Forum: Scripting
Topic: Join two scripts
Replies: 10
Views: 957

Join two scripts

I have 2 scripts and they work very well, but I have realized that I can make a single script to do both jobs, but I don't know how to do it, these are the two scripts: :global filenameIP "iphistory.txt" :global arrMonths {jan="01";feb="02";mar="03";apr="...
by eldoncito2019
Mon Apr 25, 2022 8:03 pm
Forum: Scripting
Topic: Use global variable that already exists in another script [SOLVED]
Replies: 3
Views: 1433

Re: Use global variable that already exists in another script [SOLVED]

Thanks for your help Amm0, I already solved my problem


:global stopRouterRun
:put $stopRouterRun 

:do {
      
      
      
      :delay 60
} while=(!$stopRouterRun)



EL DONCITO
by eldoncito2019
Mon Apr 25, 2022 5:42 pm
Forum: Scripting
Topic: Use global variable that already exists in another script [SOLVED]
Replies: 3
Views: 1433

Use global variable that already exists in another script [SOLVED]

Guys, I have this global variable in another script and I would like to use it in another script, how would it be?

:global stopRouterRun false

:do {
             

           :delay 60
} while=(!$stopRouterRun)


EL DONCITO.
by eldoncito2019
Sat Apr 23, 2022 5:18 pm
Forum: Scripting
Topic: Scrip for relase/renew IP DHCP Client
Replies: 22
Views: 42779

Re: Scrip for relase/renew IP DHCP Client

In scheduler and give it a time of 10 seconds for the script to run.

"ether1" is your interface that receives internet, with what name do you have it?


EL DONCITO.
by eldoncito2019
Sat Apr 23, 2022 5:09 pm
Forum: Scripting
Topic: Scrip for relase/renew IP DHCP Client
Replies: 22
Views: 42779

Re: Scrip for relase/renew IP DHCP Client

Try this friend


:if condition=([/ping 1.1.1.1  count=6] =0) do={/ip dhcp-client release [ find interface ="ether1"]}

I hope it helps you



EL DONCITO.
by eldoncito2019
Sat Apr 23, 2022 2:11 pm
Forum: Scripting
Topic: Write to a .txt file
Replies: 5
Views: 2044

Write to a .txt file

Hi guys, can you help me with a script that writes a message recorded in the routerboard log to a .txt file. I would like to record in the file. txt every time I change my IP address which is dynamic Thanks for your help





EL DONCITO.
by eldoncito2019
Wed Apr 20, 2022 12:08 am
Forum: Scripting
Topic: Register file. txt uptime
Replies: 12
Views: 1338

Re: Register file. txt uptime

if I can go to: http://worldclockapi.com/api/json/cet/now
I can read; http://worldclockapi.com/api/json/cet/now
and my time zone is: america/ caracas and the GMT offset: -04:00





EL DONCITO.
by eldoncito2019
Tue Apr 19, 2022 10:10 pm
Forum: Scripting
Topic: Register file. txt uptime
Replies: 12
Views: 1338

Re: Register file. txt uptime

I need your help friends.




EL DONCITO.
by eldoncito2019
Tue Apr 19, 2022 7:58 pm
Forum: Scripting
Topic: Register file. txt uptime
Replies: 12
Views: 1338

Re: Register file. txt uptime

Thanks friend, but it is not what I need, what I need is that according to the uptime, you can give me the information at what time the routerboard reboot.




EL DONCITO.
by eldoncito2019
Sun Apr 17, 2022 7:39 pm
Forum: Scripting
Topic: Register file. txt uptime
Replies: 12
Views: 1338

Register file. txt uptime

hello guys, you can make a .txt file to record the time the routerboard was started for the first time with the following data:

Date: Apr/17/2022
Time: 13:10:10
Uptime: 1d 00:09:20

Thanks for your help.




EL DONCITO:
by eldoncito2019
Sat Apr 16, 2022 2:18 am
Forum: Scripting
Topic: Date in script
Replies: 7
Views: 1925

Re: Date in script

badie help me please







EL DONCITO,
by eldoncito2019
Fri Apr 15, 2022 7:27 pm
Forum: Scripting
Topic: Date in script
Replies: 7
Views: 1925

Re: Date in script

And if we put something like this: :global filenamedate "datehistoryII.txt" /file :if ([:len [find where name="flash" and type="disk"]] = 1) do={:set filenamedate "flash/$filenamedate"} :if ([:len [find where name=$filenamedate]] = 0) do={print file="$fil...
by eldoncito2019
Fri Apr 15, 2022 6:02 pm
Forum: Scripting
Topic: Date in script
Replies: 7
Views: 1925

Re: Date in script

I use version 6.49.4 and I don't have SNTP enabled, because in this version the time is given by the mikrotik without the need for SNTP.
by eldoncito2019
Fri Apr 15, 2022 4:08 pm
Forum: Scripting
Topic: Date in script
Replies: 7
Views: 1925

Date in script

Guys, I have the following script thanks to REXTENDED and it works very well, it records in file every time the IP address changes, but when the routerboard is rebooted and its time has not yet been synchronized, it records in file that IP address with that time How would I go about solving that pro...
by eldoncito2019
Thu Apr 14, 2022 4:37 pm
Forum: Scripting
Topic: Thanks to Rextended
Replies: 4
Views: 979

Re: Thanks to Rextended

Solved.




EL DONCITO.
by eldoncito2019
Tue Apr 12, 2022 3:50 am
Forum: Scripting
Topic: One last little help please
Replies: 2
Views: 554

One last little help please

I have the following scripts: :global interfaceIP "ETHERT 1" :global filenameIP "historial de IPs.txt" :global arrMonths {jan="ENE";feb="FEB";mar="MAR";apr="ABR";may="MAY";jun="JUN";jul="JUL";aug="AGO"...
by eldoncito2019
Mon Apr 11, 2022 12:07 am
Forum: Scripting
Topic: Thanks to Rextended
Replies: 4
Views: 979

Re: Thanks to Rextended

I used something similar to add 2 minutes.

Then that was the start time for my dyn updater scheduler.
How is your script friend?



EL DONCITO.
by eldoncito2019
Sun Apr 10, 2022 4:22 pm
Forum: Scripting
Topic: Thanks to Rextended
Replies: 4
Views: 979

Thanks to Rextended

I made the following script thanks to the help of REXTENDED: :delay 600 :global arrMonths {jan="01";feb="02";mar="03";apr="04";may="05";jun="06";jul="07";aug="08";sep="09";oct="10";nov="11";...
by eldoncito2019
Fri Apr 08, 2022 4:13 pm
Forum: Scripting
Topic: Can it be done with a script? [SOLVED]
Replies: 9
Views: 2266

Re: Can it be done with a script? [SOLVED]

Thank you friend rextended.




EL DONCITO.
by eldoncito2019
Thu Apr 07, 2022 10:53 pm
Forum: Scripting
Topic: Can it be done with a script? [SOLVED]
Replies: 9
Views: 2266

Re: Can it be done with a script? [SOLVED]

It is to register it in a script but with AM-PM time




EL DONCITO.
by eldoncito2019
Thu Apr 07, 2022 9:33 pm
Forum: Scripting
Topic: Can it be done with a script? [SOLVED]
Replies: 9
Views: 2266

Can it be done with a script? [SOLVED]

Greetings, friends, you can change the time of the format that the routerboard brings from 24 hours, to (AM-PM), according to the following example:

08:05:00 08:05:00 AM.
15:18:00 03:18:00 PM.

Thanks for your help.



EL DONCITO.
by eldoncito2019
Thu Apr 07, 2022 12:57 am
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

and if we use
/system clock get time
instead of

/system ntp client get last-update-before


EL DONCITO.
by eldoncito2019
Thu Apr 07, 2022 12:19 am
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

give me the IP

where is quit



EL DONCITO.
by eldoncito2019
Thu Apr 07, 2022 12:13 am
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

Let's see if it works dear friend

By the way, what command should I use to get out of this?
[admin@CYBER ENK\B4AS] /system script>



EL DONCITO.
by eldoncito2019
Thu Apr 07, 2022 12:08 am
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

I have version 6.49.4, and the time is automatically synchronized, the SNTP CLIENT is not necessary

which SNTP servers do you have configured in your RB, give them to me to see if they work for me in mine.



EL DONCITO.
by eldoncito2019
Thu Apr 07, 2022 12:00 am
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

I have version 6.49.4, there it is not necessary to have SNTP Client enabled



EL DONCITO.
by eldoncito2019
Wed Apr 06, 2022 11:54 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

where is run only once.



EL DONCITO.
by eldoncito2019
Wed Apr 06, 2022 11:50 pm
Forum: General
Topic: Consultation [SOLVED]
Replies: 0
Views: 1187

Consultation [SOLVED]

Friends, how do I get out of this?
[admin@CYBER ENK\B4AS] /system script> 
I mean what command.
used (..)


EL DONCITO.
by eldoncito2019
Wed Apr 06, 2022 11:45 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

So how can I do it?



EL DONCITO.
by eldoncito2019
Wed Apr 06, 2022 11:37 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

I put the script in scheduler and I put 1 minute to execute




EL DONCITO.
by eldoncito2019
Wed Apr 06, 2022 11:18 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

Rextended friend, I gave the routerboard in system reboot, and nothing happened



EL DONCITO.
by eldoncito2019
Wed Apr 06, 2022 10:19 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

not exactly when routerboard booted, but: the value is close to last boot datetime if the RouterBOARD have Internet on reasonable time, because it write the exact moment when RouterBOARD syncronize the time Let's wait to see how it works, I'll let you know when I try it, thanks friend Rextended. EL...
by eldoncito2019
Wed Apr 06, 2022 10:10 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

On RouterOS the variable of type datetime do not exist.... :put [:typeof [/sys clock get date]] :put [:typeof [/sys clock get time]] :put [:typeof [/system resource get uptime]] the returned value for date are simply a string... and a time for time and uptime... working with string is like to do :p...
by eldoncito2019
Wed Apr 06, 2022 9:57 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

This script must be launched at startup. :global arrMonths {jan="01";feb="02";mar="03";apr="04";may="05";jun="06";jul="07";aug="08";sep="09";oct="10";nov="11";dec="12"} { :local f...
by eldoncito2019
Wed Apr 06, 2022 9:25 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

You can use the "Only the last" script at post #6: https://forum.mikrotik.com/viewtopic.php?p=924514#p924514 Why continuosly run the script? The boot time is still the same... Is useless every minute do the calc and write it on file, the boot time is the exact same value... the equipment ...
by eldoncito2019
Wed Apr 06, 2022 8:53 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

Ok, this create single files: :delay 120s :global arrMonths {jan="01";feb="02";mar="03";apr="04";may="05";jun="06";jul="07";aug="08";sep="09";oct="10";nov="11";dec="12"} { :local ...
by eldoncito2019
Wed Apr 06, 2022 8:39 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

the script keep history of shutdown (every time the script is launched...)


I want is for me to register, the last start of the RB and not to be overwriting the file. Thank you for your valuable collaboration.



EL DONCITO.
by eldoncito2019
Wed Apr 06, 2022 8:11 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

... a script that creates a file.txt for me to know at what time the electrical service was restored in my RB ... The routerboard need internet to setup correctly the clock, the 120s waiting is for waiting the Internet and time sync Shedule this script to start at startup: :delay 120s :global shutn...
by eldoncito2019
Wed Apr 06, 2022 7:09 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

Is clear that @afuchs do not read your OP.... add :delay 60s at start of the script you can add more seconds, for the time needed to the connection go up... This is YOUR script fixed, with horrors, ehm..., errors removed... :delay 60s :global stopRouterRun false :do { :local file "electric-cut...
by eldoncito2019
Wed Apr 06, 2022 6:51 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

Re: A little help please

Have you tryed //system scheduler add name="create _file" on-event=<your script to generate file> policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup ? startup - execute the script 3 seconds after the system startup. (from https://wiki.mikrotik.com/w...
by eldoncito2019
Wed Apr 06, 2022 4:50 pm
Forum: Scripting
Topic: A little help please
Replies: 45
Views: 3202

A little help please

I have the following script and it works very well for me, every time the electricity is cut off it tells me in a file.txt the date and time the service was cut off. :global stopRouterRun false; :do { :local file "electric cut.txt"; :local day ([:pick [/system clock get date] 4 6]); :local...
by eldoncito2019
Wed Apr 06, 2022 4:18 pm
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

Thanks for your help friend Rextended


EL DONCITO
by eldoncito2019
Tue Apr 05, 2022 6:15 pm
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

Solved friend Rextended




EL DONCITO
by eldoncito2019
Tue Apr 05, 2022 5:49 pm
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

I have version 6.49.4, I'm going to download it to your version to see


EL DONCITO
by eldoncito2019
Tue Apr 05, 2022 5:23 pm
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

the file comes out blank friend




EL DONCITO.
by eldoncito2019
Tue Apr 05, 2022 4:08 pm
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

Very grateful friend Rextended and how would I put this part in the script? :local day ([:pick [/system clock get date] 4 6]); :local mon ([:pick [/system clock get date] 0 3]); :local year ([:pick [/system clock get date] 7 11]); :local date "$day-$mon-$year"; :local time (:put [/system c...
by eldoncito2019
Tue Apr 05, 2022 3:19 am
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

Friend, I already put the line that he told me and now how do I know where the file is saved?




EL DONCITO.
by eldoncito2019
Mon Apr 04, 2022 8:12 pm
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

Sorry friend, as it is, it's fine, I just want you to tell me how to save it in the internal memory of my RB, so that the file is not lost when the RB is restarted



EL DONCITO
by eldoncito2019
Mon Apr 04, 2022 7:39 pm
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

In file just write the current IP, what could be going wrong?



EL DONCITO
by eldoncito2019
Mon Apr 04, 2022 7:07 pm
Forum: Scripting
Topic: Help with this script [SOLVED]
Replies: 19
Views: 2977

Re: Help with this script [SOLVED]

In file just write the current IP, what could be going wrong? Thanks for your help.
The interface where the internet arrives is ETHER 1



EL DONCITO
  • 1
  • 2