March 13, 200223 yr I am trying to use a batch file to open a file called "ScriptScheduler.fp5". The batch file works perfectly when run from the DOS command line, but won't run from the Task Scheduler. I've tried moving the batch file ("Script.bat") into the WINNT directory, but it didn't make any difference. Does the batch file need to reside in the same directory as the .FMP file that I want to open?: The batch file (Script.bat): start "c:program filesfilemakerfilemaker pro 5filemaker pro.exe" "c:winntprofilessommelpdesktopScriptScheduler.fp5" What am I doing wrong here?
March 16, 200223 yr Try this in your batch file: set FMSDir=c:FileMakerServer set FMPDir=c:Program FilesFileMakerFileMaker Pro 5 set FMP="%FMPDir%FileMaker Pro.exe" %FMP% "%FMSDir%schedulerScriptScheduler.FP5" I put by BATch files in a folder off the root [c:]
March 18, 200223 yr Author Thanks for your response, dykstrl. I tried substituting your code for mine (with the paths changed to reflect my file locations), but I still couldn't get it to work. Runs like a champ when called from DOS, but Task Scheduler still won't call Script.bat. This is how I currently have it set up: FMS Directory: C:Program FilesFilemakerFilemaker Server 5 FMP Directory: C:Program FilesFilemakerFilemaker Pro 5 ScriptScheduler.fp5 location: C:Program FilesFilemakerFilemaker Server 5Scheduler Batch File Location: C:BatchScript.bat C:Program FilesFilemakerFilemaker Server 5 Script.bat: Set FMSDir=c:Program FilesFilemakerFilemaker Server 5 Set FMPDir=c:Program FilesFilemakerFilemaker Pro 5 Set FMP="%FMPDir%Filemaker Pro.exe" %FMP% "%FMSDir%SchedulerScriptScheduler.FP5" See any reason why Task Scheduler isn't calling the batch file? [ March 18, 2002, 12:29 PM: Message edited by: Philip Sommers ]
March 19, 200223 yr What O/S is this? You are using either the System account or an account with Administrator privliges to run the task, correct? Will
March 20, 200223 yr 2 things come to mind: Check the event viewer to see if there are any error messages related to the Task Scheduler if it ran or not. Second - try moving the file to a higher level (such as c:backup) - I have seen times that the file path is too long.
March 21, 200223 yr Author Will: I'm running NT 4.0 with admin privileges, but I'm running FMP 5.0 and Server 5.0 on the same machine for testing purposes (yeah, I know I'm not supposed to do that, but for the time being, I have no choice). dykstrl: When you say move the file to a higher level, I assume you are talking about the batch file (script.bat). I have tried it both in the root of C (C:script.bat) and in a subdirectory of C. I've also tried moving around the location of the ScriptScheduler.fp5 file. When you say "event viewer", are you referring to the "Task" column in the console Task Scheduler? If not, how do I access the event viewer that you're talking about?
March 22, 200223 yr Maybe a shot in the dark but have you tried running the batch file using the "AT" command instead of the task scheduler? Will
April 30, 200223 yr Phillip - did you ever figure this out? I am having the same sort of problem. I have nearly identical batch files in the same location. One for stopping and then one for starting the service. They both work like a champ from the command line. I set up two schedule with FileMaker Server 5.5 scheduler. Each one identical except for time of day and batch file to run. The scheduler runs the Stop batch file no problem, but it will not run the Start batch file.
May 1, 200223 yr Author Lwlgeorge: I still haven't figured it out yet (I've been working on other aspects of the project and haven't revisited the batch problem since the last posts. I was only trying to open and close the file (the scripts run upon opening the file). I haven't tried to start/stop service yet. If I figure it out, I'll shoot you an e-mail and post it here. Regards ...
May 10, 200223 yr Phillip: Here's what works for me under NT4. Assuming a batch file named filemaker.cmd on c: that I want to run every Friday at 10 AM (Note: unless you have a reason not to I would rename .bat files to .cmd under NT/2000) at the command line type the following: at 10:00 /interactive /every:f "c:filemaker.cmd" I believe there may be some issues with scheduling a batch to run under task scheduler/at if you tell it to run within 24 hours so try setting the date back a few days to test then just forward to that day or schedule the batch to run a couple of days later. Make sure to put the path in quotes. Let me know if this works. Will
Create an account or sign in to comment