Quote:
Originally Posted by sheng
If I understand correctly
0 0 0 0 0 0 means the 00:00 PM of monday, and the job only once?
I want this to change the mapcycle until the other day, or 1 0 0 0 0 0..
I´m allright?
|
I don't really understand your question regarding "the other day", but that syntax you have will NOT work. Take a look inside your sc_jobs.cfg file that comes with the plugin. There is documentation in there. When it talks about "end weekday/hour/minute", there is no termination, it's just defining when the job would run. You can have a job that runs only Sunday through Tuesday, every hour, by using 0 2 ? ? 0 0.
What I can tell you from experience is that if you specify an "start" > "end" (as in your example above), it won't work. You "end" must be greater than or equal to "start", i.e "start" <= "end".
If you wanted to change the mapcycle once a week, say on Sunday at midnight, it would look something like this:
sc_addjob 0 0 0 0 0 0 "mapcyclefile my_mapcycle.txt"
Of course, if that job runs and you never restart the server, the mapcycle would stay set to my_mapcycle. If you wanted to change it back on Tuesday at 7
0AM, you'd have to add another job that would look like this:
sc_addjob 2 2 7 7 30 30 "mapcyclefile mapcycle.txt"
The "start" and "end" is more for repeating jobs, such as printing a message. For example:
sc_addjob ? ? 17 21 0 0 "sm_say Welcome to happy hour!"
Would print the message to chat every day at 5PM, 6PM, 7PM, 8PM and 9PM.
If you wanted to print the same message every minute between those same hours, but only on Friday and Saturday, you could do this:
sc_addjob 5 6 17 21 0 59 "sm_say Welcome to happy hour!"
Now here's the catch that I was talking about that isn't really documented. If you wanted it on Sunday as well, you would have to use a separate job, since your "start" cannot be greater than "end" - no rollovers. If you enter something like:
sc_addjob 5 0 17 21 0 59 "sm_say Welcome to happy hour!"
trying to get it to run Friday through Sunday, it won't work, nor can you do that with hours or minutes:
sc_addjob 5 6 22 2 0 0 "sm_say Welcome to happy hour!" <<< Won't work
sc_addjob 5 6 20 0 0 0 "sm_say Welcome to happy hour!" <<< Won't work
sc_addjob 5 6 20 22 0 0 "sm_say Welcome to happy hour!" <<< Will work
sc_addjob 5 6 20 22 0 30 "sm_say Welcome to happy hour!" <<< Will work
sc_addjob 5 6 20 22 45 15 "sm_say Welcome to happy hour!" <<< Won't work
Whenever you have a job you want to repeat that starts in one week and ends in the next, or one day and ends in the next, or one hour and ends in the next, you have to use 2 separate jobs.
__________________