Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
miegorengman
Wanderer


Joined: 05 Sep 2008
Posts: 51

PostPosted: Wed Jul 26, 2023 7:19 am   

can a trigger respond to the time of day?
 
i log everything, and one thing i have found datamining my logs by last changed...or the date in the title...is that i play way to late at night and roll over from one day to the next, so my logs often contain more than one date. I would like to implement a trigger that sees that the time is midnight, closes out the old log and begins the new. my only problem is trigger on midnight. is there a ways to trigger specificically from that time of day? thanks all
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Jul 26, 2023 12:06 pm   
 
It is possible, in fact, I have that very trigger.

#ALARM {0:00:00} {#LOG %concat(%sessionid, " ", %time(yyyy-mm-dd), " ", %time(hh), "00.txt")}

I also use the following:

#EVENT onConnect {#LOG %concat(%sessionid, " ", %time(yyyy-mm-dd), " ", %time(hh), "00.txt")}

This sometimes gives me multiple logs for a single day, but I find that preferable to not having a log because i wasnt logged in at midnight.
_________________
Discord: Shalimarwildcat
Reply with quote
miegorengman
Wanderer


Joined: 05 Sep 2008
Posts: 51

PostPosted: Thu Jul 27, 2023 4:19 am   
 
very nice, thank you. I personally prefer more logs to fewer. it is always handy to be able to go back and do some research
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net