Raised This Month: $51 Target: $400
 12% 

[ANY] Server Crontab


Post New Thread Reply   
 
Thread Tools Display Modes
dubbeh
Senior Member
Join Date: Jul 2007
Old 11-13-2015 , 09:07   Re: [ANY] Server Crontab
Reply With Quote #241

Hey, that looks fine. Just double check the actual _restart command, usually "quit" works for most servers running under a restart script.
__________________
SM Plugins - dubbeh.net - Plugin requests are welcome
dubbeh is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 11-13-2015 , 15:22   Re: [ANY] Server Crontab
Reply With Quote #242

Interesting changes, but good. I've never used the Unix cron, so I'm left wondering, what happens when your config has a value of 0, or otherwise outside the acceptable parameters, for day and month? Hopefully just an error message which is logged at the time the config is loaded.
__________________
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
igotfits
Senior Member
Join Date: May 2009
Old 01-27-2016 , 04:02   Re: [ANY] Server Crontab
Reply With Quote #243

Great plugin!
The "say hello!" command works well but "rcon changelevel ctf_2fort" does not work. any idea?

Last edited by igotfits; 01-27-2016 at 04:21.
igotfits is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-27-2016 , 04:32   Re: [ANY] Server Crontab
Reply With Quote #244

Quote:
Originally Posted by igotfits View Post
Great plugin!
The "say hello!" command works well but "rcon changelevel ctf_2fort" does not work. any idea?
Remove "rcon", or try "sm_rcon" instead.
404UserNotFound is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 01-27-2016 , 16:06   Re: [ANY] Server Crontab
Reply With Quote #245

Quote:
Originally Posted by igotfits View Post
Great plugin!
The "say hello!" command works well but "rcon changelevel ctf_2fort" does not work. any idea?
The plugin runs from inside the server, so there shouldn't be any need to use any rcon in any of your commands.
__________________
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
dubbeh
Senior Member
Join Date: Jul 2007
Old 02-02-2016 , 19:40   Re: [ANY] Server Crontab
Reply With Quote #246

Quote:
Originally Posted by Bittersweet View Post
Interesting changes, but good. I've never used the Unix cron, so I'm left wondering, what happens when your config has a value of 0, or otherwise outside the acceptable parameters, for day and month? Hopefully just an error message which is logged at the time the config is loaded.
Anything out of bounds when you add a job will return ThrowNativeError, small code snippet to give an example:

Code:
    iJobTime[JOB_MINUTE] = GetNativeCell(1);
    if (!SC_IsMinuteValid(iJobTime[JOB_MINUTE]))
        return ThrowNativeError(SP_ERROR_NATIVE, "Minute value is out of range - Maximum value is 59");
    
    iJobTime[JOB_HOUR] = GetNativeCell(2);
    if (!SC_IsHourValid(iJobTime[JOB_HOUR]))
        return ThrowNativeError(SP_ERROR_NATIVE, "Hour value is out of range - Maximum value is 23");
    
    iJobTime[JOB_DAY_OF_THE_MONTH] = GetNativeCell(3);
    if (!SC_IsDayOfTheMonthValid(iJobTime[JOB_DAY_OF_THE_MONTH]))
        return ThrowNativeError(SP_ERROR_NATIVE, "Day of the month value is out of range - Minumum 1 - Maximum 31");
    
    iJobTime[JOB_MONTH] = GetNativeCell(4);
    if (!SC_IsMonthValid(iJobTime[JOB_MONTH]))
        return ThrowNativeError(SP_ERROR_NATIVE, "Month value is out of range - Minumum 1 - Maximum 12");
    
    iJobTime[JOB_DAY_OF_THE_WEEK] = GetNativeCell(5);
    if (!SC_IsDayOfTheWeekValid(iJobTime[JOB_DAY_OF_THE_WEEK]))
        return ThrowNativeError(SP_ERROR_NATIVE, "Day of the week value is out of range - Min 0 (Sunday) - Max 6 (Sat)");


Basically everything will give user feedback (Just noticed a spelling mistake too and my OCD wants to release an update "Minumum"
but will wait and see how the progression goes with the events module).

@igotfits Everything is ran directly on the server as Bittersweet said, no need to have anything related to using remote console and glad you like the plugin


Been really busy since i got back home last weekend with real life, sorry for the late replies.
__________________
SM Plugins - dubbeh.net - Plugin requests are welcome
dubbeh is offline
peri0dic
Junior Member
Join Date: Dec 2015
Old 02-07-2016 , 21:10   Re: [ANY] Server Crontab
Reply With Quote #247

Im trying to make this command "!sm_csay Hello" run every 5 minutes im having trouble figuring it out
I want to go every 5 minutes forever.. any help formatting it? I am utterly confused haha thanks
peri0dic is offline
Snaggle
AlliedModders Donor
Join Date: Jul 2010
Location: England
Old 02-08-2016 , 06:29   Re: [ANY] Server Crontab
Reply With Quote #248

Quote:
Originally Posted by peri0dic View Post
I want to go every 5 minutes forever.. any help formatting it? I am utterly confused haha thanks
Could this work?
PHP Code:
*/* * * * "sm_csay @all Hello" 

Last edited by Snaggle; 02-08-2016 at 10:54.
Snaggle is offline
dubbeh
Senior Member
Join Date: Jul 2007
Old 03-18-2016 , 04:25   Re: [ANY] Server Crontab
Reply With Quote #249

Quote:
Originally Posted by Snaggle View Post
Could this work?
PHP Code:
*/* * * * "sm_csay @all Hello" 
Hey, Sorry I missed this.

The way the plugin is coded right now, it doesn't support that style command syntax - Will have to add an individual job once every 5 minutes for it to function like that.
Hopefully I can get that done for the next update, been quite busy getting Radio finished recently and was away from home for 3 months.
__________________
SM Plugins - dubbeh.net - Plugin requests are welcome
dubbeh is offline
szogun
Senior Member
Join Date: Apr 2016
Old 09-05-2017 , 15:41   Re: [ANY] Server Crontab
Reply With Quote #250

What do you do wrong, he adds by rcon command

sc_addjob 10 21-23 * * * "exec server.cfg"

logs
Quote:
sc_addjob 10 21-23 * * * "exec server.cfg"
[SC] Cron job """ added successfully
exec: couldn't exec server.cfg"
L 09/05/2017 - 219:48: rcon from "xxx": command "sc_addjob 10 21-23 * * * "exec server.cfg"
next command
sc_printjobs

log
Quote:
Id Minute Hour DayOfTheMonth Month DayOfTheWeek Job
0 10 21 * * * "
L 09/05/2017 - 21:41:28: rcon from "xxx": command "sc_printjobs "

Last edited by szogun; 09-05-2017 at 15:42.
szogun 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 07:02.


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