Timers, scheduling and Ruby

On 12/1/06, [email protected] [email protected] wrote:

but

  1. just drop them
  2. send out an extra notification immediately
  3. queue up the missed notifications for the next time

agreed. i’d add:

  1. call user handler - specification possible at event creation

there is some uber cron thingy on macs that handles this i think…
anyone?

I believe you’re referring to launchd.
http://developer.apple.com/macosx/launchd.html The correct title of
this
article is launchd. The initial letter is shown capitalized due to
technical
restrictionshttp://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_(technical_restrictions)#Lower_case_first_letter
.

"launchd is a unified, open
sourcehttp://en.wikipedia.org/wiki/Open_source service
managementhttp://en.wikipedia.org/wiki/Operating_System_service_management
framework http://en.wikipedia.org/wiki/Framework for starting,
stopping
and managing
daemonshttp://en.wikipedia.org/wiki/Daemon_(computer_software),
programs http://en.wikipedia.org/wiki/Computer_program and
scriptshttp://en.wikipedia.org/wiki/Shell_script.
It was introduced with Mac OS X
v10.4http://en.wikipedia.org/wiki/Mac_OS_X_v10.4
/Darwin http://en.wikipedia.org/wiki/Darwin_(operating_system)
v8.0,
and is licensed under the Apache
Licensehttp://en.wikipedia.org/wiki/Apache_License.
Dave Zarzycki http://en.wikipedia.org/wiki/Dave_Zarzycki is credited
with
designing and maintaining launchd.

The launchd
daemonhttp://en.wikipedia.org/wiki/Daemon_(computer_software)is
essentially a replacement for
init http://en.wikipedia.org/wiki/Init,
rchttp://en.wikipedia.org/wiki/Unix_security,
the init.d
http://en.wikipedia.org/w/index.php?title=Init.d&action=editand
rc.d http://en.wikipedia.org/w/index.php?title=Rc.d&action=edit
scripts,
SystemStarter http://en.wikipedia.org/wiki/SystemStarter (Mac OS X),
inetdhttp://en.wikipedia.org/wiki/Inetdand
xinetd http://en.wikipedia.org/wiki/Xinetd,
atdhttp://en.wikipedia.org/w/index.php?title=Atd&action=edit,
crond http://en.wikipedia.org/wiki/Crond and
watchdogdhttp://en.wikipedia.org/w/index.php?title=Watchdogd&action=edit.
Apple has stated that it intends to eliminate all of the aformentioned
services in favor of launchd. As of OS X v10.4 Apple has moved most of
the
processes handled by the previously mentioned daemons to launchd. By
consolidating all the launch services into one program, launchd
significantly shortens boot time on slow computers."[1]
[1] launchd - Wikipedia

There is a ruby gem called moment that is a timer/scheduler for
jobs. It even has cron compatible syntax or simple trigger stlyes.

gem install moment

Cheers-
– Ezra Z.
– Lead Rails Evangelist
[email protected]
– Engine Y., Serious Rails Hosting
– (866) 518-YARD (9273)

On Sat, 2 Dec 2006, Michael G. wrote:

[1] launchd - Wikipedia

Sorry everyone, I had no idea this paste would turn out so hideous.

heh. no problem. you were right too.

-a

it sure could. i’m of the opinion though, that users should be allowed
to
shoot themselves in the foot - if you want to schedule 40,000 events per
second then fine, maybe your quantum computer can actually handle it!
:wink:

Me too… as long as they’re not also shooting the users and the systems
admin in the foot too :wink: