This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Binding time (scheduled jobs)

Old posts that have not been replied to for several years.
Locked
r
ramirez
Voice
Posts: 10
Joined: Wed Feb 23, 2005 5:25 pm

Binding time (scheduled jobs)

Post by ramirez »

Hey, before [censored] up anything, I might ask this here.
Can I bind times with eggdrop like with cronjobs?
I want a scheduled job to call a certain proc every 4th hour, and instead of doing:

Code: Select all

bind time - "00 00 * * *" proc
bind time - "00 04 * * *" proc
bind time - "00 08 * * *" proc
bind time - "00 12 * * *" proc
bind time - "00 16 * * *" proc
bind time - "00 20 * * *" proc
Can I just do (like with cronjob):

Code: Select all

bind time - "00 */4 * * *" proc
or

Code: Select all

bind time - "00 00,04,08,12,16,20 * * *" proc
Or is there some other way to achieve this?

Thanks.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

nope, eggdrop doesn't support UNIX cron daemon's syntax
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

but you could easily emulate it with:

Code: Select all

bind time - "00 *" foo
proc foo {m h d mo y} {
   if {$h % 4 == 0} {
   # go ahead, do the stuff
   }
}
r
ramirez
Voice
Posts: 10
Joined: Wed Feb 23, 2005 5:25 pm

Post by ramirez »

Yeah, that works fine demond, thanks. :)
Locked