Solved

Scheduled scripts

Posted on 2013-05-17
3
331 Views
Last Modified: 2013-05-22
Hi
I have FM SERVER 11 and I have never been able to run a scheduled script that saves ,in this case a pdf doc and attaches it to an email .I discovered that it cant be done in this way.
I have an On timer script running from  FM PRO 11 installed on the PC running FM Server which is fine but I was wondering if there was not a better way.
I have a calendar system in one of the tables which will give me day of week   and week numbers. so I could set a looped script to establish the day number and then run the script on the day.I have not tried it yet but thought I would fist ask if there is a better way
Basically I want several reports sent out  via email every Monday of the week as pdf attachments  containing latest data.
Regards
Chris
0
Comment
Question by:Krisraychris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Accepted Solution

by:
Will Loving earned 500 total points
ID: 39176470
Chris - the only way I'm aware of for doing this is to have your FM Pro installed on a Mac instead of a PC and then use Automator to run an Applescript - Applescript being the built-in inter-application scripting system that is part of the Mac OS - that "tells" FileMaker to run the particular script that creates and emails the PDF. Automator has the ability to run an Applescript on a schedule. Perhaps you can find an unused Mac to use for your "robot" instance of FileMaker; you could possibly even run it with FMP 9 or 10 as long as your scripts didn't use and FM 11 specific features.

Automator is relatively easy to figure out and I think Apple may have tutorial videos available online as well.
0
 
LVL 2

Expert Comment

by:ozbigben
ID: 39176721
There are a couple of options for PC that I use to schedule things.

Simplest:
In your remote database, add a script that closes the database.  On your PC, create a second database with a script that runs when it opens. This script should call the remote script that you want to schedule and then close the remote database and itself. Then all you have to do is set a scheduled task to open that database.

Single database + batch file.
I use a text file to store a text string that is imported by the opening script in the database, the value of which determines which script steps to run. A database close script resets this text file so that your scheduled script is not run... In this way, the script will not run unless the text file is edited first.  To automate the script then, you call it from a DOS batch file that first echoes the keyword to start the script into the text file and then opens the database. As before, all you need then is a scheduled task to open the batch file.
e.g.: https://vimeo.com/38144297 (skip to about 2:00)
0
 

Author Closing Comment

by:Krisraychris
ID: 39189899
I have found an old mac and  I think it will work .I also have an old version of FM Server 10 as a back up plan  but from what I have read it does not allow this action either. One would think this is a fairly basic reporting requirement and that FM would make it available. Guess they have their reasons. As a last resort I will set an Ontimer script on the Server resident version of FM Pro.
As for the second suggestion I not sure if it will work on my system as I am not too keen on switching the DB on and Off.
Thanks for the help
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 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