header
Welcome Guest to ServerDoc - Auto Restart crashed servers and programs (game www ftp servers) with remote control panel
ServerDoc

· About ServerDoc
· Download/Purchase
· Getting Started
· User Guide
· Forums
· Feedback/Suggestion
· Mailing List
· Link To Us
· Your Account
· Linux


ServerDoc - Auto Restart crashed servers and programs (game www ftp servers) with remote control panel: Forums

Serverdoc :: View topic - Need Help: Running a daily script
Need Help: Running a daily script

 
Post new topic   Reply to topic    Serverdoc Forum Index -> Serverdoc
View previous topic :: View next topic  

Author Message
BOT



Joined: Jan 31, 2011
Posts: 4

PostPosted: Mon Jan 31, 2011 10:55 pm    Post subject: Need Help: Running a daily script Reply with quote

I'm trying to create a schedule to get serverdoc to run a perl script once a day but cannot get it to do so.

I've tried various things from long restart delay etc.

I would appreciate if someone could suggest the schedule code to achieve this.

thks.
Back to top
View user's profile Send private message
Author Message
sanderso
Site Admin


Joined: Jan 17, 2003
Posts: 1822

PostPosted: Thu Feb 03, 2011 7:14 pm    Post subject: Reply with quote

http://www.serverdoc.com/modules.php?name=UserGuide#Schedule
Quote:
This will run a Half Life server on Monday & Tuesday, TFC on Wed, Thurs and Friday and Counterstrike on the weekend and run update.exe at 1am every day then load up the server that was running once update.exe stops.
00 00 2 * * * c:\halfli~1\hlds -console
00 00 4 * * * c:\halfli~1\hlds -console -game tfc
00 00 7 * * * c:\halfli~1\hlds -console -game cstrike
00 01 * * * * -s:update.exe


So to run at 1am daily use:
00 01 * * * * -s:command.exe

Also see: "Running Perl Scripts"
http://www.serverdoc.com/modules.php?name=Forums&file=viewtopic&t=515
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Author Message
stipchaser



Joined: Feb 05, 2011
Posts: 1

PostPosted: Sun Feb 06, 2011 2:41 am    Post subject: Reply with quote

Let me elaborate if I may, we both manage this WIN2003 server that BOT has mentioned. What we need is a script to run from the folder via the command prompt at 12:00AM every night 7 days a week. Below is the location of the folder and what has to run:

Our folder/directory location is C:\hlxce

The script hlstats-awards.pl has to run from that directory. So if some one would be as so kind as to help us with the proper syntax it would greatly be appreciated. I think we are close maybe someone can modify what we have here?

Current (not working) schedule.txt:

Code:

00 00 * * * -s cmd /c c:\cd\hlxce\hlstats-awards.pl


Thanks in advance
Back to top
View user's profile Send private message
Author Message
sanderso
Site Admin


Joined: Jan 17, 2003
Posts: 1822

PostPosted: Sun Feb 06, 2011 6:56 pm    Post subject: Reply with quote

In schedule.txt try:
00 00 * * * -s cmd /c C:\hlxce\hlstats-awards.pl
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Author Message
BOT



Joined: Jan 31, 2011
Posts: 4

PostPosted: Wed Feb 16, 2011 11:14 pm    Post subject: Reply with quote

sanderso wrote:
In schedule.txt try:
00 00 * * * -s cmd /c C:\hlxce\hlstats-awards.pl


Tried this exactly as you have shown. Stipchaer has a typo, there was no "cd\" in the command line.

Serverdoc appears to keep trying to immediately restart the script on termnination over and over and eventually causes the wholeserver to crash. I need it to run the script once and then on termination wait and run it again 24hrs later.

What is the difference having the command line in the schedule.txt file vs. in the command line in sdcontrol? I've tried both ways but produces the same result (crash).
Back to top
View user's profile Send private message
Author Message
sanderso
Site Admin


Joined: Jan 17, 2003
Posts: 1822

PostPosted: Sun Feb 20, 2011 7:42 am    Post subject: Reply with quote

I assumed serverdoc was going to stop a process to run the script then return to original process..

ok try this then if serverdoc is only running the script..:

23 59 * * * RESTARTOFF
00 00 * * * -s cmd /c C:\hlxce\hlstats-awards.pl
00 01 * * * STOP
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Serverdoc Forum Index -> Serverdoc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group
Version 2.1 by Nuke Cops © 2003 http://www.nukecops.com
TBlue by DR Designs © 2004

Forums ©
footer
Copyright 2004 serverdoc.com

Web site engine code is Copyright 2003 by PHP-Nuke All Rights Reserved PHP-Nuke is Free Software released under the GNU/GPL license