View Single Post
Plugin Info:     Modification:          Category:          Approver:   Emp` (115)
hoboman
Senior Member
Join Date: Jul 2007
Old 03-27-2008 , 20:27   Hobo Crontab ( Scheduler )
Reply With Quote #1

Hobo Crontab

Description:
This plugin will schedule to run a list of commands or comment/uncomment a plugin from your plugins.ini file which it will read from hobo_crontab.ini file in your addons\amxmodx\configs folder ( auto created if you don't create it ) on a given day of month, day of week, hour and minute.
Cron Entry Format:
Code:
day_of_month day_of_week hour minute | cmd..., $plugin_to_comment..., @plugin_to_uncomment...

- day of month has to be a number 1-32 or a * which means that for every day of month
- day of week has to be a number 0-6 where 0 is Sunday and 6 is Saturday or a * which means that for every day of week
- hour has to be a number 0-24 or a * which means that for every hour of the day
- minute has to be a number 0-60 or a * which means that for every minute of the hour

- can uncomment any plugin from the plugins.ini file by putting a @ before of its name
- can comment any plugin from the plugins.ini file by putting a $ before of its name

Examples
:
Code:
03 01 02 59 | say mp_roundtime 5, say NOW
- on the third day of the month, Monday, the second hour on the fifty ninth minute change the round time to 5 minutes then the server will say "NOW"

Code:
* 2 * 2 | say hello, $repay.amxx, @ptb.amxx, changelevel cs_assault
- on every day of month, Tuesday, every hour and on the second minute make the server say "hello", comment the repay.amxx plugin and uncomment the ptb.amxx plugin then set the map to cs_assault.
Commands:
hobo_crontab_reload - reloads all the entries from the hobo_crontab.ini file. This is useful because otherwise the entries only get updated on map change.
hobo_show_time - shows the current time on the game server. This is useful for planning what time to put each command for if your server is in a different timezone.
Plugin Notes:
- the maximum length of a single command in an entry is 31 characters
- the maximum number of commands per entry is 8 ( #define MAX_CMDS_PER_ENTRY )
- the maximum number of entries is 32 ( #define MAX_CRON_ENTRIES )
Attached Files
File Type: sma Get Plugin or Get Source (hobo_crontab.sma - 3183 views - 8.5 KB)
__________________

Last edited by Emp`; 08-18-2011 at 03:06. Reason: Fixed Typos
hoboman is offline