{"id":5055,"date":"2025-05-25T22:29:58","date_gmt":"2025-05-25T21:29:58","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=5055"},"modified":"2025-12-03T14:16:21","modified_gmt":"2025-12-03T14:16:21","slug":"checking-operation-time","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/wordpress\/cron-scheduled-tasks\/checking-operation-time","title":{"rendered":"Checking operation time"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Seeing how long we&#8217;ve taken to decide if we do more<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">At the start of the operation<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>  $OurStartTime = microtime(true);<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Checking how long has elapsed<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/\/CHECK FOR ENOUGH TIME LEFT TO DO ... (php.ini will default limit to 30 seconds!)\n  $OurTimeNow = microtime(true);\n  $ElapsedSeconds = $OurTimeNow - $OurStartTime;\n  if ($ElapsedSeconds &lt; 12)\n  {\n  }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Seeing how long we&#8217;ve taken to decide if we do more At the start of the operation Checking how long has elapsed<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,189,381],"tags":[],"class_list":["post-5055","post","type-post","status-publish","format-standard","hentry","category-cron","category-cron-scheduled-tasks","category-timers"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=5055"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5055\/revisions"}],"predecessor-version":[{"id":5056,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5055\/revisions\/5056"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=5055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=5055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=5055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}