Task Scheduler - by JustinHoMi
1 Attachment(s)
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. |
Is it just me or do some of JustinHoMi plugins should be incorpated into the AMXX project?
Good plugin, thanks for the port. |
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 :wink: 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. |
very interesting :wink:
|
#include <amxmodx> please
|
Quote:
|
Quote:
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! |
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? |
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.... |
Quote:
|
hehe thanks pendragon. Either way, this is a good port. Thanks for converting it.
As stardust said, this plugin has endless possiblilities. I am pretty sure i will find a lot of good uses for it. 8) |
It would be nice to enhanced this plugin with cron (linux task scheduler) syntax, so it would be possible to run tasks only on specific days of the week or on specific dates (a christmas greeting maybe on 24 Dec. :)
There was an plugin bk_cron in adminmod, maybe you can look into the source. http://www.wing-clan.de/plugins/bk_c...bk_cron1.1.zip |
well maybe someone will be up to the task cause I am no coder... let alone a (X)nix wiz. So I leave that wonderfull suggestion and new update task for an actual plugin coder...
I contacted the plugin author about me porting it and he never responded so I am assuming that he's dropped off the face of this planet.... so if anyone else is up for the challenge - by all means go for it. |
azure wrote:
Quote:
If you have resolved this please post up how you did it. I was thinking it was the cycle. Some combination of custom maps. Or maybe when a new map was voted in it messed up the plug in. This has really has been a problem in my server for quite sometime. Im very tired of changing the cycles and server/amx.cfg myself. We have ppl who donate to the server for events such as "Suck Me Sideways Sudays" with no walking and some other silly rules. Rabid Monkey Mondays all custom maps. Im always forgetting to adjust and when Im away its just impossible. If there were a way to automate a weeks worth of these things it would be invalueble to our community. |
How many scheduled tasks can i setup with this plugin?
|
you are limited by your imagination
|
lobstah, I can't guarantee it but, after I disabled the nextmap plugin everything started working. Give it a try.
This task scheduler plugin is awesome. Besides getting my time specific mapcycles to work, I have set up the mapspecific configs plugin to show custom messages for certain maps. For example, I set up fy_snow to show a tsay message every 3 minutes stating that FF is turned off in that map (we are a friendly fire server). When it comes to messages, the possiblilities are endless. There are many other ways this plugin can be used, just takes imagination. |
Hello, i would like to get some help with this plugin :d
in fact, i want Warcraft3 to be run every evening, between 20.00 and 23.59 so, in amxx.cfg i placed Code:
//Task Schedulerbut it's not working :'( somebody could help me please? Thanks ! and nice job to amx mod x devs ;) |
Quote:
dunno maybe if i put Try this Code:
//Task Scheduler |
Thx sana, it works ;)
|
could this be made into days of the week?
taskmonday.cfg-tasksunday.cfg? |
Quote:
|
what about a certain date in the year? like... July 5th i want my csstats module to reset.
|
up !
|
Quote:
So how did the regs like not knowing whats coming next? Do you have a nextmap work around? If not, I think its ironic that to keep regs and new players happy and better informed you have to disable the most basic informative feature there is. What's more gratifying than being able to look at HLSW or type a word in game and know what the next hour or so may hold. This is so embedded in pubbing many players have forgotten or never learned to type 'listmaps in console. GiLaN, how about http://forums.alliedmods.net/showthr...?p=24848#26563 |
task scheduler
Nice, I was looking for the amxx version, only where is my b (time before end of round :cry: )
|
can the time be * ? so it executes the command at random time
amx_task * "command" m |
Quote:
although.. I don't think anyone would care if they did not know what the next map is. |
wanted to mention that our stats logging miraculously started working. Now, if we could just have a simple nextmap plugin. Only feature we need is a public say nextmap and it shows the players what the nextmap is. We don't need any of the other features. Then maybe it would't conflict with multiple mapcycles.
I am currently running without the plugin so we have no conflicts. However, I must admit that our players miss the nextmap command quite a bit. |
Hi there!
I want a this to work so the plugin announce something like this: "Server is restarting ..bla bla bla" Then it should kill the server, so ex. Linux server is restarting whole server to prevent memory leak ! What should I do? Cheers Morpheus |
Quote:
I placed to amxx.cfg following to shutdown the server: Code:
amx_task 2:55 "amx_csay yellow Server is going down in 5 minutes" trCode:
1 3 * * * <commandline used to start the server>Hope it helps, T. |
Thx i will go try that out now :-)
Cheers Morpheus |
Quote:
Everything is working perfectly untill server task is amx_rcon quit ! Server is not shutting down, but when I use amx_rcon quit manually via console server is shutting down!? How come? Cheers Morpheus |
you can use the shutdown command directly without using
"amx_rcon" infront of it. :wink: |
Oh nice...
I will try that out.... Thx Morpheus |
How to reset the cvars :?:
Any help plz , or must i restart the server then :?: THX |
Quote:
T. |
I did this
amx_task 20 "fireworks 10" mr amx_task 3 "amx_csay red [CSL] *This server is using Client Screenshot Logfile*" mr amx_task 5 "amx_tsay green [CSL] *Checking Screen*" mr Now if i want the fireworks to stop or change the time , then what ? Because its stay in the memory if i do amx_task 60 "fireworks 5" mr then the server shoots fireworks every 60 min and every 20 min because i cant deleted the first task only if i restart the server then its ok But is there no other way ? Cvar amx_task_delete or something like that |
Hey I am trying to get this scheduler to do different mapcycles at different times of day. Can anyone please tell me:
where do I put these different mapcycles? do i need to specify where they are and how? what is the actual command I need to put in amxx.cfg to do this? If anyone can help I would totally appreciate it. I have been messing with it all day with and without nextmap.amxx on and it keeps freezing atmapchange and not going anywhere. If anyone can help I would totally appreciate it. I got it to do other tasks fine, so I know it works I just can't seem to come up with the correct commands to do these mapcycles. |
Anyone, this is driving me insane?
|
| All times are GMT -4. The time now is 10:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.