Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/home/groups/n/no/noxwizard/cvs/src/crontab.h File Reference

Simple crontab-like scheduler for UOX servers. More...

Go to the source code of this file.

Functions

void killCronTab ()
 Kills the scheduler, just for reloads otherwise useless (OS frees memory automatically).

void initCronTab ()
 Inits the scheduler, must be called right before the main loop.

void checkCronTab ()
 checks for ready schedules, should be called at the beginning of the main loop


Detailed Description

Simple crontab-like scheduler for UOX servers.

Author:
Xanathar
Remarks:
All the cron-jobs are in crontab.uox under the uox directory
Note:
The entries are checked in the same order entered
Note:
If you enables the DEBUGMODE macro commands are not executed but a system string is broadcasted to everyone with the command line at execution time
Note:
Note that the "resolution" is 2 minutes so the schedule "* * * * * SAVE" is a save executed every 2 minutes
Note:
This piece of code is actually ALPHA TESTING ;) don't blame me if it destroy your server
Note:
any line not beginning with a number is considered a comment
Note:
since this is a rather old piece of code written originnaly for uox3 (but then discarded) it may (and probably will) contain some bugs :(
Note:
On NoX-Wizard 0.50 and later, this will become the main scheduling engine for all realworld time scheduled tasks, like weather changes, world saves, backups, and more
Note:
Can be edited with the not pratical :D text editor of remote administration and eventually reloaded. New tasks can be added at runtime with no save by amx fns with
<font face="monospace">addCronTask ( const format[], ...);</font>
which simply adds a schedule with that ConOut like syntax command.
Note:
Also the commands ADDCRON and ADDCRONW of remote administration takes a string and insert it directly in the tasks list, the secondo updating the file also.

Function Documentation

void checkCronTab  
 

checks for ready schedules, should be called at the beginning of the main loop

Function to be called every now and then... check to tasks ready to be scheduled

Author:
Xanathar

void initCronTab  
 

Inits the scheduler, must be called right before the main loop.

Function called to init the Crontab management code

Author:
Xanathar
Remarks:
must be called right before the main loop

void killCronTab  
 

Kills the scheduler, just for reloads otherwise useless (OS frees memory automatically).

Frees the memory and kills the scheduler [maybe for a reload, not needed for termination] not really deeply debugged (ok neither the rest is really deeply debugged! eheh ;) )

Author:
Xanathar
SourceForge.net Logo