{"id":4081,"date":"2019-02-12T16:21:58","date_gmt":"2019-02-12T16:21:58","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/usage-help-manual\/1-utilities-and-user-commands\/wait_for_event\/"},"modified":"2026-02-13T14:23:18","modified_gmt":"2026-02-13T19:23:18","slug":"wait_for_event","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/11-utilities-and-user-commands\/wait_for_event\/","title":{"rendered":"wait_for_event"},"content":{"rendered":"<div>\n<h3>Purpose:<\/h3>\n<\/div>\n<dl>\n<dd>\n<p>Wait for a specified event with an optional timeout in seconds.<\/p>\n<\/dd>\n<\/dl>\n<h3>Enter:<\/h3>\n<dl>\n<dd>\n<p><strong>wait_for_event<\/strong> &lt;event_name&gt; [timeout]<\/p>\n<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<dl>\n<dd>\n<div>\n<table style=\"width: 100%; border-collapse: collapse;\">\n<tbody>\n<tr>\n<td style=\"width: 19.6%;\">event_name<\/td>\n<td style=\"width: 80.39%;\">Specify the event name to wait for.\u00a0<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 19.6%;\">timeout<\/td>\n<td style=\"width: 80.39%;\">Optional. Specify the timeout in seconds. The default is 86400 (1 day).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/dd>\n<\/dl>\n<h3>Example:<\/h3>\n<dl>\n<dd>\n<p><strong>wait_for_event<\/strong> myevent<\/p>\n<p>The example specifies the event to wait for using the default timeout.<\/p>\n<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>\n<p>Returns 0 if the event is received, 1 if the timeout expires, and -1 if an error occurs such as the event not existing.<\/p>\n<\/dd>\n<\/dl>\n<h3>See Also:<\/h3>\n<dl>\n<dd>\n<p><a href=\"\/wp-content\/uploads\/Test-Manager-Program.pdf\">Test Manager User Guide<\/a><\/p>\n<\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Wait for a specified event with an optional timeout in seconds. Enter: wait_for_event &lt;event_name&gt; [timeout] Where: event_name Specify the event name to wait for.\u00a0 timeout Optional. Specify the timeout in seconds. The default is 86400 (1 day). Example: wait_for_event myevent The example specifies the event to wait for using the default timeout. Notes: Returns [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":1948,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4081","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/4081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=4081"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/4081\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1948"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=4081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}