Abort script after certain amount of time


Author
Message
SabRV
SabRV
Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)
Group: Forum Members
Posts: 16, Visits: 92
Dave - 9/25/2019
SabRV - 9/25/2019
Hi all,

Question: I want my script to be aborted after 25 min. I can only find commands on how to abort on conditions of responses etc. Does anyone have a command for this?

Thanks in advance!
Best,
Sabrina

The script.elapsedtime property gives you the amount of time elapsed (in millisecond) since the start of script execution, so you can do something like this

/ ontrialend = [ if (script.elapsedtime >= 1500000) script.abort();]

Awesome Dave, thank you!!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
SabRV - 9/25/2019
Hi all,

Question: I want my script to be aborted after 25 min. I can only find commands on how to abort on conditions of responses etc. Does anyone have a command for this?

Thanks in advance!
Best,
Sabrina

The script.elapsedtime property gives you the amount of time elapsed (in milliseconds) since the start of script execution, so you can do something like this

/ ontrialend = [ if (script.elapsedtime >= 1500000) script.abort();]

Edited 5 Years Ago by Dave
SabRV
SabRV
Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)Partner Member (670 reputation)
Group: Forum Members
Posts: 16, Visits: 92
Hi all,

Question: I want my script to be aborted after 25 min. I can only find commands on how to abort on conditions of responses etc. Does anyone have a command for this?

Thanks in advance!
Best,
Sabrina
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search