January 14, 201015 yr Hi. Is there any way I can detect if a window is running an OnTimer script without manually controlling this in the relevant script? I would like to be able to check if the automation is running as planned, either in the Data Viewer or within other scripts. Cheers, Andreas
January 14, 201015 yr Can't you check the fields that are affected by the script, last modified? Or have the script set a timestamp?
January 14, 201015 yr Author Thanks for the suggestions, bcooney. It is a sync script that runs a few times each hour, and sometimes there are no changes. Setting a timestamp will work, but will not actually tell me that the script is running at this moment, only that it ran on the last timestamp. What I'm driving at, I guess, is some insurance that everything is ok at the time when I leave the database unattended. A status function that informed on the next scheduled exceution would be nice. Cheers, Andreas
March 21, 201114 yr What I'm driving at, I guess, is some insurance that everything is ok at the time when I leave the database unattended. A status function that informed on the next scheduled exceution would be nice. Andreas, I agree, something like a tiny clock icon in the menu bar to let us know that the OnTimer is still counting down in the background. I made this solution to give me some visual feedback that the OnTimer is running, and how much time is left before it triggers again. It uses a Web Viewer with a customizable interval and color. See attached file: OnTimerProgressBar.zip
March 22, 201114 yr What we are missing is Get (OnTimerScripts) to return the Window name, script and interval.
March 22, 201114 yr What we are missing is Get (OnTimerScripts) to return the Window name, script and interval. Indeed - and while you're at it, a next trigger [timestamp] would also be useful.
March 22, 201114 yr What we are missing is Get (OnTimerScripts) to return the Window name, script and interval. Exactly. I imagined something like Get (OnTimerStatus) that would return a value list of all running OnTimer scripts with the information: Window name/script/interval/and seconds until next trigger.
March 22, 201114 yr Well, you could do one yourself by setting a $$variable when you install the OnTimer trigger. However, there are still some gotchas: There is no WindowID (at least not one you can get at), and Filemaker does not enforce unique window names; If you do a New Window[] from a window that has an OnTimer script, the new window has the same script installed, too. This, BTW, is something to watch for in general. There is no way I can see to store the triggered script's name other than as a string - so it will break if you rename the script.
Create an account or sign in to comment