Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here

NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Author Topic: scheduler Plugin  (Read 22107 times)

Offline ryan

  • Jr. Member
  • **
  • Posts: 28
Re: scheduler Plugin
« Reply #15 on: June 19, 2010, 04:49:47 PM »
v1.1 released. This is a bugfix release for bfbc2 users

Is it possible to have something scheduled to happen when the game starts?

Offline xlr8or

  • [ www.xlrstats.com ]
  • Project Lead
  • Hero Member
  • *
  • Posts: 2057
    • The Art of Tactical Gaming
Re: scheduler Plugin
« Reply #16 on: June 20, 2010, 11:06:29 AM »
Not with this plugin, this one acts on time.

Perhaps you can use the config manager? This one executes gameserver config files on mapstart: http://www.bigbrotherbot.net/forums/downloads/?sa=view;down=18

Offline grosbedo

  • Former Dev. (senate)
  • Sr. Member
  • *****
  • Posts: 258
Re: scheduler Plugin
« Reply #17 on: August 10, 2010, 02:39:49 AM »
Really great plugin, can save a lot of troubles to many game servers admins.

Personally, I had to write a wrapper to send such commands to game servers, but if Id knew the existence of your plugin before, I wouldn't XD

Offline learco

  • Full Member
  • ***
  • Posts: 124
Re: scheduler Plugin
« Reply #18 on: September 03, 2010, 07:07:07 PM »
hi all!
how are you?
i've a few questions for this plugin. it's useful for displays message but really i don't understand how can i set time.
daily happens one time for day at random hour?
and hourly? can you set hourly only?
for the last question, how can i find a rcon commands list for know how run with rcon?
thank you for this!
have a good day!

Offline grosbedo

  • Former Dev. (senate)
  • Sr. Member
  • *****
  • Posts: 258
Re: scheduler Plugin
« Reply #19 on: September 03, 2010, 10:55:19 PM »
i've a few questions for this plugin. it's useful for displays message but really i don't understand how can i set time.
daily happens one time for day at random hour?
and hourly? can you set hourly only?

It always runs at the defined time, there's no random.

You can do it the human readable way or cron way.

For the human readable way, you can do something like :

Code: xml [Select]
<hourly name="just_a_name_you_can_set" minutes="43">


This will make the command enclosed to be sent each hour at 43 minutes (eg: 00:43 then 01:43 then 02:43 then 03:43 etc...).

It can't be random. If you set something like :
Code: xml [Select]
<hourly name="just_a_name_you_can_set">


Without the minutes="43", then it will send the command each hour at 0 minutes (eg: 00:00 then 01:00 then 02:00 etc...).

To do it the cron way, which is much more complete, but more difficult, read on.

You can either specify a number, or a * (star) that tells the scheduler to do the action you specified at each number (so if you put * for hours, it will do your action each hour).

You can go even further by using */number, this will do the action each time the second/minute/hour/day/month is dividable by number (eg: */6 in hours will tell scheduler to do an action each 6 hours).

This plugin works in a similar fashion than unix cron. You can read more informations about cron here :

http://en.wikipedia.org/wiki/Cron

An example :
Code: [Select]
	
<cron name="every3m"
    minutes="*/3"
    hour="*"
    day="*"
    month="*"
    dow="*"
    >
</cron>

for the last question, how can i find a rcon commands list for know how run with rcon?

B3 can't tell you such things, but you should be able to grab these infos directly in-game.

Since you seem to play UrT, then from your game server console, you can type /cmdlist to get a full list of all the commands that you can use.

You can issue a /cmdlist from your own computer too, you don't need to access the console, but you may miss some commands that are reserved to game servers.
« Last Edit: September 03, 2010, 11:58:42 PM by Courgette »

Offline Max][mu$

  • Jr. Member
  • **
  • Posts: 44
Re: scheduler Plugin
« Reply #20 on: September 11, 2010, 04:31:33 PM »
Anyone know where I can place this scr_veh_respawntimemax 999 in the scheduler.xml? Its an rcon command that cannot be written to basic server config. The default setting is 60 seconds and I pretty much want it set at 999, but I want the scheduler to initiate this via rcon every 20 minutes.

Any ideas? Thanks.


Offline learco

  • Full Member
  • ***
  • Posts: 124
Re: scheduler Plugin
« Reply #21 on: September 12, 2010, 09:17:12 AM »
thanks to you, grosbedo!  :)

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: scheduler Plugin
« Reply #22 on: September 12, 2010, 11:28:41 AM »
@Max][mu$: try

Code: [Select]
<configuration plugin="scheduler">
<cron name="vehicule respawn time"
minutes="*/20"
hour="*"
day="*"
month="*"
dow="*">
<rcon>scr_veh_respawntimemax 999</rcon>
</cron>
</configuration>
« Last Edit: September 12, 2010, 04:48:48 PM by Courgette »

Offline Max][mu$

  • Jr. Member
  • **
  • Posts: 44
Re: scheduler Plugin
« Reply #23 on: September 12, 2010, 04:47:01 PM »
This worked! Thank you very much Courgette! :)

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: scheduler Plugin
« Reply #24 on: November 15, 2010, 03:41:07 AM »
New release : v1.2 which is an update to make this plugin work for MoH

Offline GeneralFailure

  • Jr. Member
  • **
  • Posts: 34
    • [FPF] FrankenPower FAILURE
Re: scheduler Plugin
« Reply #25 on: November 16, 2010, 03:06:14 PM »
New release : v1.2 which is an update to make this plugin work for MoH

Hi Courgette,

this Plugin runs now very good on MOH  ;D

very thx for this

Offline Spoon

  • Sr. Member
  • ****
  • Posts: 255
    • EHD Gaming
Re: scheduler Plugin
« Reply #26 on: December 15, 2010, 02:08:26 PM »
Can some1 tell what im doing wrong? here is my xml

Code: [Select]
<configuration plugin="scheduler">

<cron name="newYear" minutes="0" hour="0" day="1" month="1">
<rcon>msg "^1Happy ^2new ^3year ^4!"</rcon>
<rcon>adminmotd "^1Happy ^2new ^3year ^4!"</rcon>
</cron>

<cron name="merryChristmas" minutes="0" hour="0" day="25" month="12">
<rcon>msg "^1M^2e^1r^2r^1y ^2C^1h^2r^1i^2s^1t^2m^1a^2s"</rcon>
<rcon>adminmotd "^7www.^2EHDGaming^7.co.uk ^3| ^1M^2e^1r^2r^1y ^2C^1h^2r^1i^2s^1t^2m^1a^2s"</rcon>
</cron>

<cron name="everyTuesdayMorning" minutes="1" hour="0" dow="2">
<rcon>zom_banana 1</rcon>
<rcon>msg ^3Banana ^7Tuesday has ^2started</rcon>
<rcon>adminmotd "^7www.^2EHDGaming^7.co.uk^3 | ^3Banana ^7Tuesday"</rcon>
</cron>

<cron name="everyTuesdayNight" minutes="59" hour="23" dow="2">
<rcon>zom_banana 0</rcon>
<rcon>msg ^3Banana ^7Tuesday has ^1ended</rcon>
<rcon>adminmotd ^7www.^2EHDGaming^7.co.uk ^3| ^1Zombies ^7- ^2Running ^5v1.823</rcon>
</cron>

</configuration>

B3 registers them on startup in the log but nothing happens at the time i mean the Tuesday morning and night.

Code: [Select]
101215 12:59:26	BOT    	Loading Plugin #22 scheduler [C:\b3\b3\extplugins\conf\scheduler.xml]
101215 12:59:26 INFO Could not load built in plugin scheduler (No module named scheduler)
101215 12:59:26 INFO trying external plugin directory : C:\b3\b3\extplugins
101215 12:59:26 BOT    SchedulerPlugin: Loading config C:\b3\b3\extplugins\conf\scheduler.xml for SchedulerPlugin
101215 12:59:26 DEBUG SchedulerPlugin: setting up Task [newYear]
101215 12:59:26 DEBUG SchedulerPlugin: rcon : msg "^1Happy ^2new ^3year ^4!"
101215 12:59:26 DEBUG SchedulerPlugin: rcon : adminmotd "^1Happy ^2new ^3year ^4!"
101215 12:59:26 INFO SchedulerPlugin: 0 0 0 1 1 *
101215 12:59:26 VERBOSE Added crontab <bound method Task.runcommands of <scheduler.Task object at 0x01922E70>> (26357392) - 0s 0m 0h 1d 1M -1DOW
101215 12:59:26 INFO SchedulerPlugin: cron task [newYear] loaded
101215 12:59:26 DEBUG SchedulerPlugin: setting up Task [merryChristmas]
101215 12:59:26 DEBUG SchedulerPlugin: rcon : msg "^1M^2e^1r^2r^1y ^2C^1h^2r^1i^2s^1t^2m^1a^2s"
101215 12:59:26 DEBUG SchedulerPlugin: rcon : adminmotd "^7www.^2EHDGaming^7.co.uk ^3| ^1M^2e^1r^2r^1y ^2C^1h^2r^1i^2s^1t^2m^1a^2s"
101215 12:59:26 INFO SchedulerPlugin: 0 0 0 25 12 *
101215 12:59:26 VERBOSE Added crontab <bound method Task.runcommands of <scheduler.Task object at 0x01922EB0>> (26357456) - 0s 0m 0h 25d 12M -1DOW
101215 12:59:26 INFO SchedulerPlugin: cron task [merryChristmas] loaded
101215 12:59:26 DEBUG SchedulerPlugin: setting up Task [everyTuesdayMorning]
101215 12:59:26 DEBUG SchedulerPlugin: rcon : zom_banana 1
101215 12:59:26 DEBUG SchedulerPlugin: rcon : msg ^3Banana ^7Tuesday has ^2started
101215 12:59:26 DEBUG SchedulerPlugin: rcon : adminmotd "^7www.^2EHDGaming^7.co.uk^3 | ^3Banana ^7Tuesday"
101215 12:59:26 INFO SchedulerPlugin: 0 1 0 * * 2
101215 12:59:26 VERBOSE Added crontab <bound method Task.runcommands of <scheduler.Task object at 0x01922EF0>> (26357520) - 0s 1m 0h -1d -1M 2DOW
101215 12:59:26 INFO SchedulerPlugin: cron task [everyTuesdayMorning] loaded
101215 12:59:26 DEBUG SchedulerPlugin: setting up Task [everyTuesdayNight]
101215 12:59:26 DEBUG SchedulerPlugin: rcon : zom_banana 0
101215 12:59:26 DEBUG SchedulerPlugin: rcon : msg ^3Banana ^7Tuesday has ^1ended
101215 12:59:26 DEBUG SchedulerPlugin: rcon : adminmotd ^7www.^2EHDGaming^7.co.uk ^3| ^1Zombies ^7- ^2Running ^5v1.823
101215 12:59:26 INFO SchedulerPlugin: 0 59 23 * * 2
101215 12:59:26 VERBOSE Added crontab <bound method Task.runcommands of <scheduler.Task object at 0x01922F30>> (26357584) - 0s 59m 23h -1d -1M 2DOW
101215 12:59:26 INFO SchedulerPlugin: cron task [everyTuesdayNight] loaded
101215 12:59:26 DEBUG SchedulerPlugin: 4 tasks scheduled
101215 12:59:26 DEBUG Register Event: Stop Process: SchedulerPlugin
101215 12:59:26 DEBUG Register Event: Program Exit: SchedulerPlugin
101215 12:59:26 BOT    Plugin scheduler (1.2 - Courgette) loaded

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: scheduler Plugin
« Reply #27 on: December 15, 2010, 02:24:48 PM »
do you still have your b3.log around "101213 12:59:00" ?

Offline christoph51

  • Jr. Member
  • **
  • Posts: 45
    • www.thehgh.com
Re: scheduler Plugin
« Reply #28 on: May 30, 2011, 07:30:47 AM »
Hey there,
this is a nice plugin for setting a different map rotation on my CoD2 server for different times of the day depending on the number of players on the server. I have it all set up, however they daily tasks will not load properly. Here is what the log outputs:
Quote
110529 22:25:35   BOT       Loading Plugin #15 scheduler [D:\UserFiles\hgh\GameServers\TC72242328121633066860387\b3\extplugins\conf\scheduler.xml]
110529 22:25:35   INFO   Could not load built in plugin scheduler (No module named scheduler)
110529 22:25:35   INFO   trying external plugin directory : D:\UserFiles\hgh\GameServers\TC72242328121633066860387\b3\extplugins
110529 22:25:35   BOT       SchedulerPlugin: Loading config D:\UserFiles\hgh\GameServers\TC72242328121633066860387\b3\extplugins\conf\scheduler.xml for SchedulerPlugin
110529 22:25:35   DEBUG   SchedulerPlugin: setting up DaylyTask [dayly1]
110529 22:25:35   DEBUG   SchedulerPlugin: rcon : say "^9Nightime maprotation in effect."
110529 22:25:35   DEBUG   SchedulerPlugin: rcon : set sv_maprotation "gametype ctf map mp_carentan gametype ctf map mp_toujane gametype ctf map mp_buhlert gametype ctf map mp_railyard gametype ctf map mp_sfrance_final gametype ctf map mp_leningrad gametype ctf map mp_farmhouse gametype ctf map mp_decoy gametype ctf map mp_carentan gametype ctf map mp_dawnville gametype ctf map mp_matmata gametype ctf map mp_breakout gametype ctf map mp_burgundy"
110529 22:25:35   ERROR   SchedulerPlugin: "None" is not a known cron rate type
110529 22:25:35   DEBUG   SchedulerPlugin: setting up DaylyTask [dayly2]
110529 22:25:35   DEBUG   SchedulerPlugin: rcon : say "^9Daytime maprotation in effect."
110529 22:25:35   DEBUG   SchedulerPlugin: rcon : set sv_maprotation "gametype ctf map mp_carentan gametype ctf map mp_toujane gametype ctf map mp_xfireb gametype ctf map rnr_neuville gametype ctf map mp_buhlert gametype ctf map mp_railyard gametype ctf map mp_farmhouse gametype ctf map mp_decoy gametype ctf map mp_carentan gametype ctf map mp_alcazaba gametype ctf map mp_dawnville gametype ctf map mp_powcamp gametype ctf map mp_matmata gametype ctf map mp_breakout gametype ctf map mp_burgundy gametype ctf map mp_canal3 gametype ctf map mp_destroyed_village gametype ctf map mp_trainstation"
110529 22:25:35   ERROR   SchedulerPlugin: "None" is not a known cron rate type
110529 22:25:35   DEBUG   SchedulerPlugin: 0 tasks scheduled
110529 22:25:35   DEBUG   Register Event: Stop Process: SchedulerPlugin
110529 22:25:35   DEBUG   Register Event: Program Exit: SchedulerPlugin
110529 22:25:35   BOT       Plugin scheduler (1.2 - Courgette) loaded

I put in bold what stands out to me, because it will always say that no matter what I put in the config.
My config says exactly:
Code: [Select]
<configuration>
<daily name="dayly1" hour="1" minutes="17">
<rcon>say "^9Nightime maprotation in effect."</rcon>
<rcon>set sv_maprotation "gametype ctf map mp_carentan gametype ctf map mp_toujane gametype ctf map mp_buhlert gametype ctf map mp_railyard gametype ctf map mp_sfrance_final gametype ctf map mp_leningrad gametype ctf map mp_farmhouse gametype ctf map mp_decoy gametype ctf map mp_carentan gametype ctf map mp_dawnville gametype ctf map mp_matmata gametype ctf map mp_breakout gametype ctf map mp_burgundy"</rcon>
</daily>

<daily name="dayly2" hour="10" minutes="55">
<rcon>say "^9Daytime maprotation in effect."</rcon>
<rcon>set sv_maprotation "gametype ctf map mp_carentan gametype ctf map mp_toujane gametype ctf map mp_xfireb gametype ctf map rnr_neuville gametype ctf map mp_buhlert gametype ctf map mp_railyard gametype ctf map mp_farmhouse gametype ctf map mp_decoy gametype ctf map mp_carentan gametype ctf map mp_alcazaba gametype ctf map mp_dawnville gametype ctf map mp_powcamp gametype ctf map mp_matmata gametype ctf map mp_breakout gametype ctf map mp_burgundy gametype ctf map mp_canal3 gametype ctf map mp_destroyed_village gametype ctf map mp_trainstation"</rcon>
</daily> 

</configuration>

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: scheduler Plugin
« Reply #29 on: May 30, 2011, 02:12:54 PM »
thanks for the report. This bug should be fixed in v1.2.1. Could you please report if it does on your side ?

 


Rate this page +1 at Google Search

anything