Need help with bind time, trying to get the bot to say something every monday and thursday at 9am.
day is a zero padded two digit integer 01 through 31 representing day of the month.
Does this mean I need to make a proc for every month since the days aren't the same for each month? Like the 15th could be monday for one month then next month it could be tuesday. Not an issue if I have to, just wonder if there is a short way?
Thanks
Last edited by cache on Thu Jul 08, 2010 3:07 pm, edited 1 time in total.
cache wrote:Need help with bind time, trying to get the bot to say something every monday and thursday at 9am.
day is a zero padded two digit integer 01 through 31 representing day of the month.
Does this mean I need to make a proc for every month since the days aren't the same for each month? Like the 15th could be monday for one month then next month it could be tuesday. Not an issue if I have to, just wonder if there is a short way?
Thanks
How about using bind time to run a proc every day at 9:00, and within that proc check to see if today is Monday or Thursday?
bind time - "* 09 * * *" time_demo
proc time_demo {min hour day month year} {
if {"[strftime %A]"=="Monday"} {
## commands to say what you want to say on Monday go here
}
if {"[strftime %A]"=="Thursday"} {
#commands to say what you want to say on Thursday go here
}
}
pseudo wrote:With the new 1.6.20rc1, you could use bind cron instead of bind time which simplifies the job.
Example: bind cron - "00 09 * * 01,04" your_proc
This will trigger every Monday and Thursday at 9AM.
Hey, hey!
This is news!
I didn't even know there was a newer version of Eggdrop out. You caused me to go look, and I found it was dated just yesterday.