To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Official ZPE/YASS documentationrun_at

run_at (function f, integer time) ⇒ boolean

Runs a function or lambda function within a separate thread at a specific time in the form of an epoch time.

First available: Version 1.8.1


This function is similar to the Unix command at.

This function can be used nicely in conjunction with the time function added in the same version.

ZPE 1.10.7+

ZPE 1.10.7 (Hasty Hyena) changed the way that the run_at command works, completely overhauling the system, making it more efficient.

It also is much easier to cancel, using the predefined interupt function on it:

function beeper()
  beep(random_number(1, 1000) * 1000, 1000))
end function

//This will make a random beep in 10 seconds time
$scheduled = run_in(handle_of("beeper"), time() + 10000)

Code previewClose
Feedback 👍
Comments are sent via email to me.