how to reboot for more than 1 minute

can anybody help me,
this is my scenario, if mikrotik received sms for less than 1 minute then proceed
if more than 1 minute the usb port reboot and remove the usb port



:foreach i in=[/tool sms inbox find where message=“2”] do={

:if ([/tool sms inbox get timestamp] < 1m) do={
/system script run [find name=“*2”]
}

:if ([/tool sms inbox get timestamp] > 1m) do={

/sys routerboard usb power-reset
/tool sms inbox remove $i;
:delay 4s;
/port remove usb
:delay 10s
/tool sms set port=usb

}

}
}
} on-error={:log error message="

Create a Scheduler with parameter “start-time=startup”
And use “:delay 60” to wait 60 sec before executing your script.

Exemple :
2021-11-23_03-51-05.jpg

thats not possible. its only a delay.

Maybe i didn’t understand your Request…

I taught you needed a way to Check 60 Sec after boot,
If your device received a SMS and if not Reset USB

What did i understand wrong ?

sorry for my bad english

if mikrotik received sms in less than 1 minute
then call script name *2

if more than 1 minute since mikrotik recieved the message
execute of rebooting usb port

i need to reboot the usb port because sometimes sms in mikrotik hang and cannot delete

Ahhh …It was my mistake

When receiving a SMS the modem sometimes get “Stuck”
Because of this, you want to constantly check if the modem is “Stuck”
and if so, reset the Modem / USB-Device.

yes sir like for example
mikrotik received sms at 12:00pm.

and if sms stuck and cannot delete at 12:02pm
thats 2 minutes already then reset the Modem / USB-Device by executing in /sys routerboard usb power-reset

anyone can help pls