Raised This Month: $ Target: $400
 0% 

[ANY] Server Crontab


Post New Thread Reply   
 
Thread Tools Display Modes
404UserNotFound
BANNED
Join Date: Dec 2011
Old 12-28-2013 , 15:13   Re: Server Crontab
Reply With Quote #191

Question. How would one accommodate timezones? Like, if I wanted to set the time up for central timezone, but the dedi is hosted in say, Quebec?
404UserNotFound is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 12-28-2013 , 17:13   Re: Server Crontab
Reply With Quote #192

Quote:
Originally Posted by abrandnewday View Post
Question. How would one accommodate timezones? Like, if I wanted to set the time up for central timezone, but the dedi is hosted in say, Quebec?
Quebec is in the Eastern Time Zone. Since the sun rises in the East, Eastern sees times one hour earlier than Central, or put another way, Central = Eastern - 1 Hour. As far as Daylight Savings goes, you should figure out exactly where in Quebec the server is, and look here:
http://en.wikipedia.org/wiki/Dayligh..._Canada#Quebec

Other than the DST thing, if you wanted something to happen at 6AM Central, you'd program for 7AM for a server in the Eastern Time Zone.
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera
Bittersweet is offline
sheng
Member
Join Date: Jan 2013
Old 02-13-2014 , 04:20   Re: Server Crontab
Reply With Quote #193

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?
__________________
sheng is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 02-13-2014 , 11:40   Re: Server Crontab
Reply With Quote #194

Quote:
Originally Posted by sheng View Post
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 70AM, 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.
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera

Last edited by Bittersweet; 02-13-2014 at 11:42.
Bittersweet is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 02-22-2014 , 12:40   Re: Server Crontab
Reply With Quote #195

Quote:
Originally Posted by Dom2364 View Post
On my server I'm trying to have randomiser on just for Friday, every Friday, then turn off at the end of Friday. It keeps turning on and off and it's getting annoying how it just turns on randomly.
Here's my .cfg:
Code:
//RANDOMISER ON
sc_addjob 5 6 0 23 0 0 "tf2items_rnd_enabled 1"
//RANDOMISER OFF
sc_addjob 6 5 0 23 1 59 "tf2items_rnd_enabled 0"
Can someone reply with a code that works?
You can't have and end day/hour/minute that is greater than your start. Try this code:

Code:
//RANDOMISER ON
sc_addjob 5 5 0 0 0 0 "tf2items_rnd_enabled 1"
//RANDOMISER OFF
sc_addjob 6 6 0 0 0 0 "tf2items_rnd_enabled 0"
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera
Bittersweet is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 08-26-2014 , 11:10   Re: Server Crontab
Reply With Quote #196

I dont get it at all with the numbers etc.

I want to turn a cvar on and off every day.

ON: 14.00
OFF: 23.00

How would that look like?

sc_addjob ? ? 14 14 0 1 "cvar_enabled 1"

sc_addjob ? ? 23 23 0 1 "cvar_enabled 0"

Last edited by Ejziponken; 08-26-2014 at 11:27.
Ejziponken is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 08-26-2014 , 12:55   Re: Server Crontab
Reply With Quote #197

Quote:
Originally Posted by Ejziponken View Post
I dont get it at all with the numbers etc.

I want to turn a cvar on and off every day.

ON: 14.00
OFF: 23.00

How would that look like?

sc_addjob ? ? 14 14 0 1 "cvar_enabled 1"

sc_addjob ? ? 23 23 0 1 "cvar_enabled 0"
Yes, that will work, but of course something else can always change the cvar. If cvar_enabled is the exact cvar and not just an example, you might want to change the name to something more specific. You also want to make sure that whatever plugin is using the cvar isn't loading it from a .cfg file when the map changes.
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera
Bittersweet is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 08-26-2014 , 13:21   Re: Server Crontab
Reply With Quote #198

Quote:
Originally Posted by Bittersweet View Post
Yes, that will work, but of course something else can always change the cvar. If cvar_enabled is the exact cvar and not just an example, you might want to change the name to something more specific. You also want to make sure that whatever plugin is using the cvar isn't loading it from a .cfg file when the map changes.
It was just an example cvar.
And thx for the tip!
Ejziponken is offline
me-Shoe
Senior Member
Join Date: Apr 2008
Old 01-04-2015 , 07:57   Re: Server Crontab
Reply With Quote #199

Hey Mates.

I have problems to setup an every hour mapchange:
Currently i have an every 30min Mapchange and it works, but i wanne change it to after 60mins mapA then after 60mins MapB and then after 60mins again MapA.

Is this possible?
__________________
me-Shoe is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 01-04-2015 , 19:24   Re: Server Crontab
Reply With Quote #200

hi, thanks for the plugin! i have a question..

restart every day at 6am

sc_addjob ? ? 6 6 0 1 "quit"

is this correct?

Last edited by asdfxD; 01-06-2015 at 12:45.
asdfxD is offline
Reply



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 01:07.


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