Solved

Filemaker Server Schedule Batch Script Running No Result

Posted on 2014-02-23
6
968 Views
Last Modified: 2014-03-23
Hi there,

I am still having trouble getting FM Server to run an external script. I have set up a schedule to run a batch script (a URL call in IE). When I manually run the batch script it works as expected. When it is scheduled it runs OK (according to the scheduler) but nothing actually happens. I have tried setting the scheduled script to use the Administrator account for the server, as well as the default account, but both give the same results (i.e. nothing). The .bat file permissions are set to execute for all accounts.

The .bat file is very simple:
start "~\\iexplore.exe" "fmp://[username]:[password]@[mydatabaseIP][myfile]?script=[script]"

Open in new window

0
Comment
Question by:jwleys
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:grnassar
ID: 39882266
So, just to be clear: you're running an external script whose purpose is to run an internal script?  ("?script=[script]")

When you say that it runs "as expected" when you run the batch script, are you running it on the server or on a local machine?  And what is the expected result?

If you're running it locally and it works, my guess is that you haven't installed the FileMaker Pro client on the server -- the batch file is, of course, launching FMP in its one line, so if you want that to run on the server you'd need the client installed there too.

That being said, that usually means there's a better way to do what you want to do (perhaps being simply to run the FM script from the server directly instead of using an external batch file).
0
 

Author Comment

by:jwleys
ID: 39883945
Hiya, thanks for your help.

Because FileMaker server has limited functionality available through its scripts I have triggered a shell script call from the server – that .bat file calls the client copy of FM Pro that is also on the server to do what FM server cannot. The server acts as both FM server and a robot machine running a FileMaker Pro client.

I have tested everything from the server directly.

The batch script runs fine on the server. The expected result is that it calls the client copy of FM Pro on the server, and triggers a script from within the client. When I schedule the server to call the batch script however, nothing happens – that is my dilemma. It looks like the schedule fires fine, with no error reported, but the batch script does not work as it does when run manually. I have sorted out a work-around for now (using on-timer scripts on the server's FM client), but still want to know why this wasn't working, as I may wish to call other shell scripts in the future . . .

In the schedule I have used the administrator login to run the batch script, including
./
before the username, as suggested by FM. It doesn't appear to be a permissions problem – it might be, but I'd expect to see an error? See attached log example – the schedule thinks it is running fine.

Hopefully that is clearer than mud ;–)
Screen-Shot-2014-02-25-at-10.17..png
0
 
LVL 1

Expert Comment

by:grnassar
ID: 39888319
The schedule thinks it's running fine because it's running iexplore.exe.  Internet Explorer isn't going to return an error from command line if FMP has trouble launching.  And FMP is probably going to have trouble launching, because you're most likely running the scheduled script from the "default account" -- which is Local System, which doesn't launch a Windows console.  No Windows console, no way to create a new window -- no new window, no FMP client.

You may be able to solve the problem by running the script as some regular user instead of using the default account; it's probably worth a shot.  If not, the typical way to do this sort of thing anyway is to schedule the task with Windows' Task Scheduler, not the FMS scheduler -- may have more luck that way.

That being said, these days there's not much that can't be done from an FMS script -- sure, some script steps won't run, but that's more because there's a better way to do them from FMS rather than because they just can't be done.  If you don't mind my digging a little deeper into the problem, what is the script supposed to do?
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:jwleys
ID: 39890018
Hi there,

I have tried running the schedule as both the default account and the administrator account (which appears to run fine as well). I still suspect this is a permissions / account issue, but can't figure it out.

The FM client script is required to create PDFs on the server and store them, as WebDirect users (the most common user type for this database) cannot do this.
0
 
LVL 1

Expert Comment

by:grnassar
ID: 39914138
My apologies -- I've been posting from a dead account without realizing it.  Reposting as my current account.
0
 
LVL 6

Accepted Solution

by:
slinkygn earned 500 total points
ID: 39914158
There, sorry about that.  I wish there were a way to merge accounts in EE so I didn't have to juggle like this!

Again, the most plausible solution is to run your batch file as a Windows scheduled task, not as a FileMaker server-side script.  Have you tried that yet?
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
finding who created AD 4 67
Can’t delete a file 14 143
Raid 6 or Raid 10? 19 138
Way to setup network drive share permanently mapped to server 3 54
Normally after a failure of Domain Controller, when promoting new DC the DC is renamed, we will discuss the options in Dcpromo to re-create the DC with the same name. Scenario: You are a small IT shop with two Domain Controllers (Domain Contr…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now