mIRC Home    About    Download    Register    News    Help

Print Thread
#122911 17/06/05 10:17 AM
Joined: Nov 2003
Posts: 101
C
colt45 Offline OP
Vogon poet
OP Offline
Vogon poet
C
Joined: Nov 2003
Posts: 101
Want to display a result every day at 12 midnight and 12 noon

How do I do that? - tried timer, but doesn't seems right to me cus when I first run at 3pm .. will shows every 3pm and 3am .. but has to be showing every day at 12 on the spot.

Any help? thanks

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
You can set timers to trigger at specific times.

/timer 12:00 1 1 echo -a It's now 12 o clock.
/timer 00:00 1 1 echo -a It's now midnight, go to bed!


See /help /timer.

Regards,


Mentality/Chris
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Adding to this, you can set it up so its like this

Code:
alias Call.Once.To.Start {
  .timer.Call.Once.To.Start.am 00:00 1 0 Called.Once.At.12am.or.pm
  .timer.Call.Once.To.Start.pm 12:00 1 0 Called.Once.At.12am.or.pm
}
alias Called.Once.At.12am.or.pm {
  .timer.Call.Once.To.Start.* off
  .timer.Call.Every.12.hours 0 43200 display.results.alias
}


this way you set off the second alias at 12 am or pm, which then sets off one every 12 hours
(this isnt the only way to do it, it can be done in one timer, but the codes harder to write)

Joined: Nov 2003
Posts: 101
C
colt45 Offline OP
Vogon poet
OP Offline
Vogon poet
C
Joined: Nov 2003
Posts: 101
Thanks, but tried that already, only works once

I leave my PC running 24/7 - wants to show "EVERY 12" hours but not once.

Know what I mean?

Here's my code what I thought it should works.

/timer 12:00 1 0 echo -a It's now 12 o clock.

See the interval 0 - that's unlimited right? - how come that doesn't work?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
swap the 0 and the 1
Code:
 /timer 12:00 0 1 echo -a It's now 12 o clock 


You had the repetitions set for 1 and the interval set for 0

Last edited by RusselB; 18/06/05 02:11 PM.
Joined: Nov 2003
Posts: 101
C
colt45 Offline OP
Vogon poet
OP Offline
Vogon poet
C
Joined: Nov 2003
Posts: 101
so far, got this to work.

Code:
{Alias}

/12noon {
  /timer 00:00 1 1 /12midnight
}

/12midnight {
  /timer 12:00 1 1 /12noon
}


Is there's an easier way round to it? - or this is the only option?

Thanks

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
/timernoon 12:00 0 1 echo -a Noon
/timermidnight 00:00 0 1 echo -a Midnight
  

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Have you even checked what that well do?
At noon and midnight, that well trigger a ENDLESS timer going off every 1 second


I releasised there was an easier way that what i did above, after looking at it.
The only problem with a exact time timer is, it then trips off the <reps> <reptime> timer following it, so the first event doesnt trigger instantly.
ie: /timer 12:00 1 1 echo The time is $time
well be
The Time is 12:00:01

Fix, for this? you set off two timers, one that goes off once at the designated time, and one that starts a timer from the designated time.
Code:
/timernoon.once 12:00 1 0 echo -a Noon
/timermidnight.once 00:00 1 0 echo -a Midnight
/timernoon 12:00 0 86400 echo -a Noon
/timermidnight 00:00 0 86400 echo -a Midnight


Link Copied to Clipboard