Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6611 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a .bat file stored in the directory C:Program FilesFileMakerFileMaker ServerDataScripts which activates a trigger.fp7 file in the same location.

If i double-click on the .bat file it opens the trigger file.

If i however make a scheduled task run the script nothing seems to happen. It runs the schedule with no errors but doesn't seem to activate the .bat file.

I have tried various different .bat files and none of them seem to open from within a schedule.

Confused...

Posted

you're trying to do what exactly? I hope not running FMP and FMS on the same machine, using the same files?

General note about FMS schedules: they run with the same account as the FMS service. When you double-click your bat file, it's running as your account. That's where the main difference is.

But: don't use the FMS machine to trigger a script in an FM file.

Posted

That explains it. Thank you.

Yes, I have always thought that too. I have done this on a test machine to see what happens. What prompted me was an article in the latest edition of FileMaker Advisor magazine that explained just such a technique.

Posted

Still a bad idea. For a lot of reasons.

The most important one being that you need to be absolutely certain that FMP opens the file from FMS and not directly from the hard disk.

The other big one is that you need to have a user logged into your machine for this to work and that's a huge security risk.

Posted

What prompted me was an article in the latest edition of FileMaker Advisor magazine that explained just such a technique.

A bad idea. Take what you read there with a grain of salt. That might include anything I've ever written there in the past.

OTOH, you can always take what Wim tells you about Server to the bank.

Steven

Posted

Could someone explain what are the issue in having FMP and FMS on the server? If this is explained elsewhere can you point me in the right direction?

If you read the article, in the batch file, instead of simply just specifying the filename to open (here trigger.fp7), if you specify the full path name of FMP exe, does that force FMP to open (and not FMS)?

If the account used to run FMS service is included in the allowed accounts to access the database, can external authentication be used? is the security risk then still an issue?

Lots of questions, still so much to learn...

Posted

Could someone explain what are the issue in having FMP and FMS on the server?

There is no guarantee the correct executable will open the file, and the problem becomes exercabated when related files are indluded in the process.

Wim has pointed out this is not a good idea; it certainly is not a best practice.

Steven

Posted

Even if the correct exe opens the file, you're not sure if FMP will actually open the file from FMS (in other words: goes out to the network card of the server and back in on that network card to connect to FMS and open the file as a guest) or if it will find the file on the hard disk and attempt to open it from there (as a host, not a guest - which will conflict with FMS already "owning" the file).

Back in FMS 5.5 and FMP 6, FMP would almost always try to open the file as a host and doing that enough will eventually corrupt the file. This behaviour is similar to allowing OS file sharing. Now in FMS7/8 the FMP search-for-file mechanism have changed but there is not enough documentation to rule out that it wouldn't happen. And since this kind of corruption occurs only over time it's not a good idea to try it. By the time it does occur chances are all your backups are no good either.

As to the security risk: it has nothing to do with the accounts in the FM file. It has to do with leaving a Server machine sitting there with a user logged into it. Which you would have to do in order to run FMP.

Posted

What prompted me was an article in the latest edition of FileMaker Advisor magazine that explained just such a technique.

Can you please state the exact edition of FileMaker Advisor and the name of the article?

Thanks.

Steven

Posted

Thank you for the discussion,

The article is from Chris Moyer, called "Trigger Scripts: Learn how to automate reports so they can run overnight" in the October/November edition.

In your opinion, the best/secure way to run an unassisted script is from a client? (without using a third party plug-in).

Until version 9 that is...

Posted

yep, from a client. Unless your scripts contain only web compatible script steps and you have Server Advanced. Then you can use the OS scripting languages and the OS task scheduler to run scripts directly on FMS through the web publishing engine.

Posted

I will have to review the article before commenting.

However as for this:

Until version 9 that is...

He who lives by the FileMaker Crystal Ball soon learns to eat ground case functions.

Steven

This topic is 6611 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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