If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > FileMaker > If/then based on CurrentTime

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-04-04, 13:25
chevell chevell is offline
Registered User
 
Join Date: Sep 2003
Posts: 7
If/then based on CurrentTime

I have a script that runs every three minutes to check for changes in the data. I want to be able to run a specific script at 7 am everyday triggered by this script. I was using If Status(currenttime) >= "7:00:00 AM" perform script "a". Unfortunately, it does absolutely nothing. I had it checking to see if it was past 7:03 so it didn't run all day and I took that out for troubleshooting. It had no effect. Still nothing. I'm using the status(currendate) to run a script on the first of every month and on mondays. For some reason I can't do a certain time. Any help would be greatly appreciated. Thanks!
Reply With Quote
  #2 (permalink)  
Old 11-05-04, 20:51
Steve T. Steve T. is offline
Registered User
 
Join Date: Sep 2003
Location: So. Cal. USA
Posts: 142
Howdy! I do not have much experience with scripts, and I thought a plug-in was required to do any timed scripts, but if you're looking for ideas, maybe you can base the script on a numeric/string value instead of a time and see if that makes a difference.

I forget my FM syntax, but something like

IF LEFT( STATUS(CURRENTTIME) ) = 7 AND SCRIPT STATUS = "NOT YET RUN", PERFORM SCRIPT

or you can put it in a calculation and have the calculation evaluate on script execution so the value is updated for the current time. Having a 2nd qualifier (script status) whose value changes when the script is executed the 1st time may help keep it from looping/repeating, too, but it may not really be needed.

Or maybe to check to see if the

If Status(currenttime) >= "7:00:00 AM"

line is working, maybe have it change a field value instead of exectuing a script. If it changes the value, maybe have script check the changed field's value and execute your other script if true, i.e. make it a 2 step process.

Don't know if any of this will help... just throwing it out to give you some ideas...
--ST
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On