BEC Scheduler

The BEC scheduler will send messages, stop the server, lock the server or several other functions at scheduled times as defined in the scheduler.xml file in the config folder. In the config.cfg file you can set the path and file name of the scheduler.xml so you can have several different scheduler.xml files and select between them.

<Scheduler> tag are the opening and closing tags that encompass ALL the <jobs> in the file. The end of the file must have the closing </Scheduler>

<Job> tags define each ‘job’ and are defined with an ID number in the opening tag <job id=”1″>. The ID’s need to be in numerical order (1,2,3,) but you CAN skip numbers (1,2,6,10) if you want to delete a job that is in between others.
The closing </job>ends this job block.

<Day> </day> tags tell the scheduler which days of the week to run this message.
<day>1,2,3,4,5,6,7</day> would be every day
<day>2,4,6</day>would be only on Monday, Tuesday and Wednesday

<Start></start> tags tell BEC when to issue this command the FIRST time.
Time is important here and there are two different methods:
Actual Time HH:MM:SS would be 13:30:00 to have it send the message at 1:30pm
Elapsed Time HHMMSS would be 013000 to have the message sent 01Hour 30Minutes 00Seconds after the server has started (hence ELAPSED TIME)
So if the time has : separting the HH MM SS then its actual time, if there is nothing separting then its elapsed time.

<Runtime></runtime> tags specify how long in ELAPSED time to wait until the message is repeated. 002000 would run the message every 20 minutes AFTER the message in Start.

<Loop></loop> defines whether the message will LOOP repeatedly and if so, how many times. Values are from -1 to 99
-1 means it loops FOREVER.
0 means it does not loop. It will print ONCE at the START time and thats all
1-99 will print the message that many times.

<Cmd></cmd> This is what the Scheduler will actuall DO at the specified time. The most common is
say -1 Some random message
which prints a message to the server.

These are the supported commands.

say -1 some text
loadbans
loadscripts
loadevents
writebans
maxping 250
#shutdown
#restart
#reassign
#lock
#unlock
#mission filename (without the .pbo extension)
systime
uptime
fortune
exit

Below is a scheduler.xml with some example messages. It sets the server to restart every 4 hours at actual times: Midnight, 4AM, 8AM, Noon, 4PM, 8PM

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<Scheduler>
  <!-- *** Restart at 12:00:00 AM ***-->
  <job id="0">
    <day>1,2,3,4,5,6,7</day>
    <start>23:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="1">
    <day>1,2,3,4,5,6,7</day>
    <start>23:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="2">
    <day>1,2,3,4,5,6,7</day>
    <start>23:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="3">
    <day>1,2,3,4,5,6,7</day>
    <start>23:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="4">
    <day>1,2,3,4,5,6,7</day>
    <start>00:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 4:00:00 AM ***-->
  <job id="5">
    <day>1,2,3,4,5,6,7</day>
    <start>03:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="6">
    <day>1,2,3,4,5,6,7</day>
    <start>03:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="7">
    <day>1,2,3,4,5,6,7</day>
    <start>03:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="8">
    <day>1,2,3,4,5,6,7</day>
    <start>03:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="9">
    <day>1,2,3,4,5,6,7</day>
    <start>04:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 8:00:00 AM ***-->
  <job id="10">
    <day>1,2,3,4,5,6,7</day>
    <start>07:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="11">
    <day>1,2,3,4,5,6,7</day>
    <start>07:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="12">
    <day>1,2,3,4,5,6,7</day>
    <start>07:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="13">
    <day>1,2,3,4,5,6,7</day>
    <start>07:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="14">
    <day>1,2,3,4,5,6,7</day>
    <start>08:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 12:00:00 PM ***-->
  <job id="15">
    <day>1,2,3,4,5,6,7</day>
    <start>11:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="16">
    <day>1,2,3,4,5,6,7</day>
    <start>11:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="17">
    <day>1,2,3,4,5,6,7</day>
    <start>11:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="18">
    <day>1,2,3,4,5,6,7</day>
    <start>11:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="19">
    <day>1,2,3,4,5,6,7</day>
    <start>12:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 04:00:00 PM ***-->
  <job id="20">
    <day>1,2,3,4,5,6,7</day>
    <start>15:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="21">
    <day>1,2,3,4,5,6,7</day>
    <start>15:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="22">
    <day>1,2,3,4,5,6,7</day>
    <start>15:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="23">
    <day>1,2,3,4,5,6,7</day>
    <start>15:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="24">
    <day>1,2,3,4,5,6,7</day>
    <start>16:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 08:00:00 PM ***-->
  <job id="25">
    <day>1,2,3,4,5,6,7</day>
    <start>19:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="26">
    <day>1,2,3,4,5,6,7</day>
    <start>19:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="27">
    <day>1,2,3,4,5,6,7</day>
    <start>19:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="28">
    <day>1,2,3,4,5,6,7</day>
    <start>19:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="29">
    <day>1,2,3,4,5,6,7</day>
    <start>20:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- ~~~ BEC Messages  ~~~-->
  <job id="30">
    <day>1,2,3,4,5,6,7</day>
    <start>000500</start>
    <runtime>003000</runtime>
    <loop>-1</loop>
    <cmd>say -1 This message will start at 5 minutes and run every 30 minutes</cmd>
  </job>
  <job id="31">
    <day>1,2,3,4,5,6,7</day>
    <start>000600</start>
    <runtime>003000</runtime>
    <loop>-1</loop>
    <cmd>say -1 This message will start at 6 minutes and run every 30 minutes</cmd>
  </job>
  <job id="32">
    <day>1,2,3,4,5,6,7</day>
    <start>000700</start>
    <runtime>003000</runtime>
    <loop>-1</loop>
    <cmd>say -1 This message will start at 7 minutes and run every 30 minutes</cmd>
  </job>
  <job id="33">
    <day>1,2,3,4,5,6,7</day>
    <start>000800</start>
    <runtime>003000</runtime>
    <loop>-1</loop>
    <cmd>say -1 This message will start at 8 minutes and run every 30 minutes</cmd>
  </job>
</Scheduler>

Leave a Reply