Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Task Scheduler not executing batch file

Featured Replies

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?

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:]

  • 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? crazy.gif

[ March 18, 2002, 12:29 PM: Message edited by: Philip Sommers ]

What O/S is this? You are using either the System account or an account with Administrator privliges to run the task, correct?

Will

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.

  • 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?

It should be located in Administrative Tools in the Start menu.

Maybe a shot in the dark but have you tried running the batch file using the "AT" command instead of the task scheduler?

Will

  • 1 month later...

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.

  • 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 ...

I appreciate that. Thanks! If I come up with anything, I will do the same.

  • 2 weeks later...

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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.