Community discussions

 
torrington
just joined
Topic Author
Posts: 9
Joined: Mon Sep 04, 2017 7:05 pm

If time between help

Thu Jun 13, 2019 6:51 am

Hi, I'm trying to make a script that runs only if the time is between for example from 18:00:00pm to 04:00:00am hs.

So far I've got this one working:

:if ([/system clock get time] > "18:00:00") do={}

This one will run if time is past 18:00:00, but what I need now is to "tell" the script to only run if time is between 18:00:00pm to 04:00:00am

Thanks everyone.
 
reiniss2
MikroTik Support
MikroTik Support
Posts: 47
Joined: Wed Jan 02, 2019 12:14 pm
Location: Latvia
Contact:

Re: If time between help  [SOLVED]

Thu Jun 13, 2019 9:24 am

Hi, I'm trying to make a script that runs only if the time is between for example from 18:00:00pm to 04:00:00am hs.

So far I've got this one working:

:if ([/system clock get time] > "18:00:00") do={}

This one will run if time is past 18:00:00, but what I need now is to "tell" the script to only run if time is between 18:00:00pm to 04:00:00am

Thanks everyone.
an example would be:
:local time [/system clock get time];
:if ($time >= "18:00:00" || $time <= "04:00:00") do={ :log warning time_is_between_18_and_04 } 
 
torrington
just joined
Topic Author
Posts: 9
Joined: Mon Sep 04, 2017 7:05 pm

Re: If time between help

Thu Jun 13, 2019 4:22 pm

Hi, I'm trying to make a script that runs only if the time is between for example from 18:00:00pm to 04:00:00am hs.

So far I've got this one working:

:if ([/system clock get time] > "18:00:00") do={}

This one will run if time is past 18:00:00, but what I need now is to "tell" the script to only run if time is between 18:00:00pm to 04:00:00am

Thanks everyone.
an example would be:
:local time [/system clock get time];
:if ($time >= "18:00:00" || $time <= "04:00:00") do={ :log warning time_is_between_18_and_04 } 
Thank you very much. Work Great!!

Who is online

Users browsing this forum: No registered users and 8 guests