Raised This Month: $7 Target: $400
 1% 

Task Scheduler - by JustinHoMi


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   DS (30)
pendragon
Senior Member
Join Date: Mar 2004
Location: In a bubble
Old 04-20-2004 , 22:40   Task Scheduler - by JustinHoMi
Reply With Quote #1

A task scheduler to perform server commands at a specified interval or a specific time. Based on Clanmod's "cm_task".

Usage:
Put tasks in your amx.cfg (or could possibly work in server.cfg) in the format:
amx_task time "command" flags

Flags:
m - time is in minutes
s - time is in seconds
r - repeat task
t - specific time (0:00-23:59, assumes "r" flag)

For example to restart the round every 5 minutes use:
amx_task 5 "sv_restart 1" mr

-------------------------------------------------------------
originally by JustinHoMi
original amx thread: http://djeyl.net/forum/index.php?showtopic=4130&st=0

NOTE: chagned all the "time" variables to "clock"
added: #include <amxmodx>

thanks to Bailopan and Gizzard for their help.
Attached Files
File Type: sma Get Plugin or Get Source (task_scheduler.sma - 16662 views - 1.4 KB)
__________________
pendragon is offline
Send a message via ICQ to pendragon
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 04-21-2004 , 00:05  
Reply With Quote #2

Is it just me or do some of JustinHoMi plugins should be incorpated into the AMXX project?

Good plugin, thanks for the port.
__________________

BigBaller is offline
azure
Member
Join Date: Mar 2004
Old 04-21-2004 , 02:17  
Reply With Quote #3

hrrmm this is very interesting. Could I set this up to change the mapcycle possibly?

like have mapcycle 1 from 9 till 23 and then mapcycle2 from 23 til 9?

I am gonna have to look into this. But, if anyone already knows the answer, please let me know

btw.. I noticed you left #include <amxmod>
the amxmodx team will want you to use #include <amxmodx> before the plugin can be approved.

Man I hope there is a way to get this mapcycle thing hooked up. I have been trying to find a way to do this for a while now.
__________________
nohasslecs.com
our CS:Source server : 66.150.107.6:27015
IRC on Gamesurge @ #NHCS
azure is offline
[BioMaN]**neogun**
Member
Join Date: Mar 2004
Old 04-21-2004 , 06:15  
Reply With Quote #4

very interesting
__________________
Il n'existe que deux choses infinies, l'univers et la bêtise humaine... mais pour l'univers, je n'ai pas de certitude absolue.
[Albert Einstein]
[BioMaN]**neogun** is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 04-21-2004 , 11:40  
Reply With Quote #5

#include <amxmodx> please
__________________
hello, i am pm
PM is offline
pendragon
Senior Member
Join Date: Mar 2004
Location: In a bubble
Old 04-21-2004 , 14:10  
Reply With Quote #6

Quote:
Originally Posted by PM
#include <amxmodx> please
done.. sorry bout that guys ... Still learning.
__________________
pendragon is offline
Send a message via ICQ to pendragon
Stardust
New Member
Join Date: Apr 2004
Old 04-24-2004 , 10:25  
Reply With Quote #7

Quote:
Originally Posted by azure
hrrmm this is very interesting. Could I set this up to change the mapcycle possibly?

like have mapcycle 1 from 9 till 23 and then mapcycle2 from 23 til 9?
I did this with the amx mod an this plugin, worked fine.
Only problem was that I wanted to specify this once, but the amx config file was run every mapload.

hmm how did I do this ...
I did something like
amx_task 18:00 "amx_tsay blue Evening mapcycle loaded" t
amx_task 18:01 "mp_timelimit 20" t
amx_task 18:02 "mapcyclefile evening.txt" t

then around 0100 I switched back
amx_task 01:00 "amx_tsay blue Standard mapcycle loaded" t
amx_task 01:01 "mp_timelimit 25" t
amx_task 01:02 "mapcyclefile mapcyclefile.txt" t


hmm how did I do this ...
I did something like
amx_task 18:00 "amx_tsay blue Evening mapcycle loaded" t
amx_task 18:01 "mp_timelimit 20" t
amx_task 18:02 "mapcyclefile evening.txt" t

then around 0100 I switched back
amx_task 01:00 "amx_tsay blue Standard mapcycle loaded" t
amx_task 01:01 "mp_timelimit 25" t
amx_task 01:02 "mapcyclefile mapcyclefile.txt" t


one nice thing about this plugin is delayed action, like shutdown

alias shutdown "exec shutdown.cfg"
---
file shutdown.cfg
--
amx_tsay red Shutting down server in 10 seconds
amx_task 10 "quit" s
amx_task 7 "amx_tsay red Server shutting down, come back later." s
--

then you just send "shutdown" to hlds via your favorite admin tool.

This plugin has endless possibilities, thx for the port!
Stardust is offline
azure
Member
Join Date: Mar 2004
Old 04-26-2004 , 03:01  
Reply With Quote #8

Yea I have tried that. And the server just gets stuck in a loop on the first map in the new cycle. If you do a listmaps in the console, it shows the new mapcycle so I know it changed. But like I said, it just keeps running the first map over and over.
In fact, just typing in "mapcyclefile newcycle.txt" causes the same issue.

Any idea why?
__________________
nohasslecs.com
our CS:Source server : 66.150.107.6:27015
IRC on Gamesurge @ #NHCS
azure is offline
azure
Member
Join Date: Mar 2004
Old 04-26-2004 , 04:41  
Reply With Quote #9

hrmm... update.
It turns out that the server only gets stuck on the first map for about 3 mapcycles. Then after that it finally starts to go through the other maps. I need to test some other stuff I guess.
I am going to get rid of the nextmap plugin. Maybe that had something to do with it?
nothing is ever easy....
__________________
nohasslecs.com
our CS:Source server : 66.150.107.6:27015
IRC on Gamesurge @ #NHCS
azure is offline
pendragon
Senior Member
Join Date: Mar 2004
Location: In a bubble
Old 04-26-2004 , 13:52  
Reply With Quote #10

Quote:
Originally Posted by azure
nothing is ever easy....
you got that right - good luck in your testing.
__________________
pendragon is offline
Send a message via ICQ to pendragon
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode