Raised This Month: $32 Target: $400
 8% 

[ANY] Server Crontab


Post New Thread Reply   
 
Thread Tools Display Modes
Obyboby
Veteran Member
Join Date: Sep 2013
Old 12-30-2017 , 13:38   Re: [ANY] Server Crontab
Reply With Quote #251

Hello.

I want to use this plugin in order to spearate day time and night time when the maps are being chosen.
I'd like to have a sort of "daytime" mapcycle and a night time one.
So for example, until 6 PM a daytime.txt mapcycle would be used, and after 6 PM, it switches to night time.
Is the maplists file going to interfere with this?
To be clear:
I also would like the map vote to pick maps on either the day or night mapcycle, according to the server time.

So in short: does this plugin override the map vote file settings or does it only affect the mapcycle itself (which would make it useless for me as I always have map votes runing at map end? :C )

Thanks!


EDIT: so I'm reading the whole thread and according to the posts in this page, it's not possible to switch mapcyclefiles as the command itself was removed in CS:GO.
I'l kep searching but if anyone has a solution please do share it here.
Like I said above, I would like to have separate map cycle files based on the time of the day (server local time), but I need to be sure that this change is also applied to the map votes that are run at half time on my server (so the maplists file should be somehow edited accordingly).


EDIT2: so I achieved this using Ultimate Map Chooser which has a time function for the maps
__________________

Last edited by Obyboby; 01-07-2018 at 14:22.
Obyboby is offline
Obyboby
Veteran Member
Join Date: Sep 2013
Old 02-07-2018 , 01:43   Re: [ANY] Server Crontab
Reply With Quote #252

PHP Code:
sc_addjob 0 6 * * * "_restart" 
This command is not restarting my server anymore. (it's meant to restart daily at 6 AM)
SourceMod Version: 1.8.0.6040

I'm missing how I can check my server's time zone? I'm pretty sure it is my own time zone but idk, I tried setting a restart job and it didn't work, also sc_printjobs in console didn't show any active jobs. Mumble
__________________

Last edited by Obyboby; 02-07-2018 at 02:08.
Obyboby is offline
Obyboby
Veteran Member
Join Date: Sep 2013
Old 02-24-2018 , 11:55   Re: [ANY] Server Crontab
Reply With Quote #253

Is it possible to set the crontab to delete some files on my server? I'd like to auto record demos of every match using GOTV, but I need to delete each after one hour or so to avoid using too much space on my server.

Would something like this example here work?

PHP Code:
0 10 * * * rm -rf /path/to/file
__________________

Last edited by Obyboby; 02-24-2018 at 12:05.
Obyboby is offline
Obyboby
Veteran Member
Join Date: Sep 2013
Old 03-14-2018 , 20:56   Re: [ANY] Server Crontab
Reply With Quote #254

Stopped working? It's not restarting my server even though I have a cronjob set and it correctly shows with "sc_printjobs".
Also I would like to know if there is a way to set a cronjob to delete server files with this plugin.

EDIT: my bad, still works. but someone plz help me create a cronjob to delete the demo files every hour
__________________

Last edited by Obyboby; 03-14-2018 at 21:19.
Obyboby is offline
napster_10
Senior Member
Join Date: May 2016
Old 05-23-2019 , 14:59   Re: [ANY] Server Crontab
Reply With Quote #255

Quote:
Originally Posted by Obyboby View Post
Stopped working? It's not restarting my server even though I have a cronjob set and it correctly shows with "sc_printjobs".
Also I would like to know if there is a way to set a cronjob to delete server files with this plugin.

EDIT: my bad, still works. but someone plz help me create a cronjob to delete the demo files every hour
i would use the systems crontab for that (crontab -e), this plugin can only handle sourcemod commands obv.

Last edited by napster_10; 05-23-2019 at 14:59.
napster_10 is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 04-19-2020 , 04:38   Re: Basic Server Crontab
Reply With Quote #256

Hello. Is there a way to keep executing files on every map change between a time already configured? For example:
Code:
sc_addjob 0 14 * * * "exec happyhour.cfg"
sc_addjob 0 18 * * * "exec happyhouroff.cfg"
Keep executing happyhour until "18" (6pm)
__________________
NanoC is offline
Send a message via Skype™ to NanoC
enderandrew
Senior Member
Join Date: Jun 2020
Old 06-30-2020 , 20:12   Re: Basic Server Crontab
Reply With Quote #257

Quote:
Originally Posted by NanoC View Post
Hello. Is there a way to keep executing files on every map change between a time already configured? For example:
Code:
sc_addjob 0 14 * * * "exec happyhour.cfg"
sc_addjob 0 18 * * * "exec happyhouroff.cfg"
Keep executing happyhour until "18" (6pm)
I'm new to this and this is presumptive but I have a config file for each game mode.

So I have a file called plr.cfg

Then each of my each of my maps, I have a config file such as plr_frostfell_b2.cfg

The first line of the map's config file is:

exec plr.cfg

That way I can easily change the settings for the entire game mode and have that transfer to all my my maps.

Now, what if you want different settings during happy hour?

You move plr-happy-hour.cfg to plr.cfg at the beginning of happy hour. At the end of happy hour you move plr-default.cfg back to plr.cfg. So even with a map change, those settings are being applied all hour because they're in plr.cfg.
enderandrew 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 18:49.


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