mIRC Home    About    Download    Register    News    Help

Print Thread
#272520 26/03/24 09:48 AM
Joined: Aug 2003
Posts: 320
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 320
I have an issue with a repeating timer apparently not triggering (and an offline timer apparently becoming online).

I set a timer with .timerMidnight -o 0:01 0 86400 echo -s It's MIDNIGHT!!!!

I can get a list of timers with /timers or get details of a specific timer with /timerMidnight and get:

* Immediately: * Timer midnight 00:01 86400s delay echo -s It's MIDNIGHT!!!! (Libera.Chat)
* A day later: * Timer midnight 86400s delay echo -s It's MIDNIGHT!!!! (Libera.chat)

So here are the issues:

1. I used the `-o` so it should be an offline timer, not associated with a connection, yet it says it is associated with a connection.
2. Once it has triggered for the first time I cannot determine the next trigger time.
3. Sometimes it is not triggering when it should.

Joined: Jul 2006
Posts: 4,187
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,187
All the behaviors you describe are correct I believe.
A timer is always associated with a status window, connected or not, -o only means that the timer won't stop if you were connected when starting it, when disconnecting from that associated status window.
If you don't use -i, the timer is associated with the current status window but the timer will stop if you close that status window, even if you used -o.
If you used -i, the timer is associated with the current status window AND the timer is reassociated to the new current status window when you close the status window associated to it, aka the timer is never stopped because you closed a status window. The help file is not very clear about this, but people want to generally use -io with their timer, the -i is often overlooked.

Once the timer trigger for the first timer at 00:01, it's as though you were using /timer -o 0 86400 echo -s .. at 00:01 manually, just an infinite timer triggering every 86400 seconds.
It won't reuse the 00:01 hours:minute parameter you specified the first time, because think about /timer -o 00:01 10 10 echo -s .., it wouldn't make sense to use a repetition and second parameter with a time parameter then.
Actually I'm not sure what you're confused with here as you can determine the next trigger time easily, it's just 24h from when it triggers which is always at 00:01.
If you wanted to echo midnight at midnight you would use 00:00, why using 00:01?

What do you mean as it's not triggering when it should?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard