I'm sure I figured this out once before but couldn't find the topic here again.
Can someone either point me to a thread showing how, or let me know briefly how to do the following:
Set a global value as to when a script is run (or when something happens in a script), then when it's run again, check to see if X amount of time (say, 1 hour or 1 day) has passed since the previous value was set (or the script was run) so that an if...else can be used.
I presume this means using getTime but my attempts so far setting a timestamp and then comparing it have failed.