Dears all;
I am using this trivia script - https://pastebin.com/RK6hRWPD - I want to modify it, such that it will be On and Off on a schedule. Like 2 hours on, and 1 hour off.
Anybody can help?
Thanks in advance
Code: Select all
#bind pubm $tgflagsstart "$tgchan %$tgcmdstart" tgstart
#bind pubm $tgflagsstop "$tgchan %$tgcmdstop" tgstop
Code: Select all
bind cron - "00 02,05,08,11,14,17,20,23 * * *" timetgstart
bind cron - "00 01,04,07,10,13,16,19,22 * * *" timetgstop
Code: Select all
proc timetgstart {min hour day month dow} {
tgstart $::botnick "launch@127.0.0.1" * $::tgchan ""
}
proc timetgstop {min hour day month dow} {
tgstop $::botnick "launch@127.0.0.1" * $::tgchan ""
}