January 8, 201412 yr Hi, Is it possible to tell FM to execute a script very day at 3 PM? Or a workaround to make that happen? Cheers Koen
January 8, 201412 yr Is it possible to tell FM to execute a script very day at 3 PM? Or a workaround to make that happen? It's not clear whether your question concerns a server or a desktop application. Please update your profile to show your version and OS.
January 11, 201412 yr Author It's not clear whether your question concerns a server or a desktop application. Please update your profile to show your version and OS. Sorry, I'll have a go on my profile. But the question is for a MacMini 10.8.x with FM Pro 12. It runs as a little server. And my user machines have FM Pro Advanced. What I want is that my server once a day runs a little script. The server itself stays (as long as i'm not busy on the server itself) in the same view of the database.
January 11, 201412 yr The best way to do this, IMHO, is from the outside: use iCal (or chron) to schedule a daily event and set the event to open another FMP file (or run an AppleScript) to trigger your script. In case of another file, it only needs to run a startup script that calls the script in the "real" file and then closes itself. To do it "from the inside" you would need to install an OnTimer script, both as part of the startup script and as part of the script being run; in each case you need to calculate the time remaining until 3:00 PM and set that as the interval. Note that the script is installed in that specific window only. If you close the window, you'll lose it.
January 12, 201412 yr Here is a quick link to your profile, MY PROFILE, please show your FileMaker version, platform and OS..
January 12, 201412 yr Author The best way to do this, IMHO, is from the outside: use iCal (or chron) to schedule a daily event and set the event to open another FMP file (or run an AppleScript) to trigger your script. In case of another file, it only needs to run a startup script that calls the script in the "real" file and then closes itself. To do it "from the inside" you would need to install an OnTimer script, both as part of the startup script and as part of the script being run; in each case you need to calculate the time remaining until 3:00 PM and set that as the interval. Note that the script is installed in that specific window only. If you close the window, you'll lose it. And If I use the OnTimer script this way : If current time = 3PM then run script i have chosen And I put the OnTimer script on a special layout for my little server. (as layout trigger) Or is that an too easy thought Here is a quick link to your profile, MY PROFILE, please show your FileMaker version, platform and OS.. Ok done so.
January 12, 201412 yr And If I use the OnTimer script this way : If current time = 3PM then run script i have chosen Alas, that's not possible: http://www.filemaker.com/13help/en/html/scripts_ref1.36.18.html#1044171
January 12, 201412 yr It is possible. Run the on timer script every hour checking for the time. Wrap your perform script in an If time =3:00
January 12, 201412 yr It is possible. Run the on timer script every hour checking for the time. Wrap your perform script in an If time =3:00 It's possible to run the OnTimer script every hour; it's not possible to run it every hour on the hour (unless you start it exactly on the hour - and even then it may drift away during the course of the day).
January 12, 201412 yr Author It is possible. Run the on timer script every hour checking for the time. Wrap your perform script in an If time =3:00 But how do I run the timer script very hour? If I can run the timer script very hour I can run any script very hour right? And how do I do that?
January 12, 201412 yr When you set an on timer script you set hour many seconds are between each execution. So set the script timer for 3600 seconds and the script it calls very 3600 seconds checks for the time and if 3:00 continue.
January 12, 201412 yr Author When you set an on timer script you set hour many seconds are between each execution. So set the script timer for 3600 seconds and the script it calls very 3600 seconds checks for the time and if 3:00 continue. Ahh, that works! But something else popped up. To test I created 2 scripts #1 the on time script - set to 15 seconds and the call script #2 #2 show custom dialog "test" I also created 2 layouts. The first one has a "onlayoutenter" to call #1 the second has no starting scripts. When I'm at the 1st layout very 15 sec I get my dialog. So thats good But when I switch to layout 2, #1 should stop working, but unfortunate it does not. It continues popping the dialog very 15 sec. How do I stop that?
January 12, 201412 yr They are tied to the window not the layout. If you want to stop the on timer script you set it again with an interval of blank using double quotation marks
January 12, 201412 yr Author They are tied to the window not the layout. If you want to stop the on timer script you set it again with an interval of blank using double quotation marks Thanks!!! Think I have the answers I'm looking for now. Cheers Koen
Create an account or sign in to comment