Jump to content

Timed script fails to run


This topic is 2612 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi All,

I have a backup script that I have set to run if the elapsed time since the last backup is equal to greater than 24 hours but it will not run:

If[user_Data::Time_Elapsed_since_Backup ≥ "23:59:59"]

  Perform Script ["Backup"]

End If

 

Elapsed_Time_Since_Backup is a calculation field set to Time

 

What can I not see?

Link to comment
Share on other sites

There are several critical things missing from your description - most importantly, what is the actual content of the Time_Elapsed_since_Backup field when the script checks it? Does the script check it at all? Is it a field that the script can see from the current context? Lots of potential failure points.

 

However, one thing jumps out immediately: "23:59:59" is text, not time. To compare a Time field to a time constant, you should use:

Timefield ≥ Time ( 23 ; 59 ; 59 )
  • Like 1
Link to comment
Share on other sites

Hi Comment,

Sorry about the missing parts, this script is part of a larger one that performs two functions based on an On Timer script and as it was only this part that is failing I only included the failure. Yes the script does check but I think your comparator is my problem, I was checking on text not time. I have changed and will know in the next five minutes if it now works correctly.

Thank You

That did indeed resolve it

Edited by Oyseka
Link to comment
Share on other sites

This topic is 2612 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.