[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/cron_handler.c

Cron Handler.

It is often desirable to schedule a task far into the future. This can be implemented via call_outs, however as the number of objects which require these callouts increases, performance decreases for call_out lookups.

Instead an object may register its execution time with the cron handler, and every CRON_CHECK_INTERVAL it will see which events are to be executed within that interval. If any exist, they will be scheduled with a submit_ee

Written by Taffyd

Started Wed Feb 26 01:06:04 2003

Class Index

Method index

Public Functions

These are functions that everyone can access.

add_job_by_time
int add_job_by_time(int time,
                    mixed ob,
                    string func,
                    mixed args)

This method calls a function at a specified time.

Parameters:
time - the time, in time() efun form, at which the function should be called.
ob - the object on which to call the function
func - the function to call on the object
args - any arguments to be passed to the callback.


bing
void bing(mixed args)
check_jobs
void check_jobs()
check_order
void check_order()
clean_jobs
void clean_jobs()
emergency_check_jobs
void emergency_check_jobs()
find_next_job
int find_next_job(int ftime)
query_jobs
class cron_job * query_jobs()
remove_jobs_by_file_name
int remove_jobs_by_file_name(mixed ob)
remove_jobs_by_function
int remove_jobs_by_function(mixed ob,
                            string func)
view_jobs
class cron_job * view_jobs()

Classes

These are nice data types for dealing with... Data!