Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    7

    Unanswered: 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!

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •