{"id":4881,"date":"2020-06-03T13:29:31","date_gmt":"2020-06-03T13:29:31","guid":{"rendered":"https:\/\/the7kennisbank.nl\/?p=4881"},"modified":"2020-06-09T13:22:22","modified_gmt":"2020-06-09T13:22:22","slug":"filter-cron-max-execution-time","status":"publish","type":"post","link":"https:\/\/the7kennisbank.nl\/nl\/wp-grid-builder\/filter-cron-max-uitvoeringstijd\/","title":{"rendered":"Filter cron max uitvoeringstijd"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><div class=\"vc_row wpb_row vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element \" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<div>\n<div class=\"container flex items-center justify-between\">\n<h1 class=\"entry-title\">\/cron\/max_execution_time<\/h1>\n<\/div>\n<\/div>\n<div id=\"article-wrapper\" class=\"container\">\n<p>This filter is called everytime the indexer start a cron process.<\/p>\n<p>It allows to modifies the <code>max_execution_time<\/code> (in seconds) of the cron indexer.<\/p>\n<p>The cron system of the plugin will frequently check, when indexing, if the server <code>max_execution_time<\/code> is not reached at a certain rate (80%). It prevents to break the indexer if this limit is reached. However, because between 2 checks, operations may exceed this limit you may need to decrease the <code>max_execution_time<\/code> thanks to this filter.<\/p>\n<table class=\"wp-block-table arguments-table\">\n<tbody>\n<tr>\n<td>Argument<\/td>\n<td>Type<\/td>\n<td>Description<\/td>\n<\/tr>\n<tr>\n<td>$execution_time<\/td>\n<td>integer<\/td>\n<td>Execution time in seconds<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"code-syntax-block code-syntax-wrapper\">\n<p>[pastacode lang=&#8221;php&#8221; manual=&#8221;function%20prefix_cron_max_execution_time(%20%24execution_time%20)%20%7B%20%0A%0A%09%2F%2F%20Set%20execution%20time%20to%2060s.%20%0A%09return%2060%3B%0A%7D%0A%0Aadd_filter(%20&#8217;wp_grid_builder%2Fcron%2Fmax_execution_time&#8217;%2C%20&#8217;prefix_cron_max_execution_time&#8217;%2C%2010%2C%201%20)%3B&#8221; message=&#8221;&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p>\n<\/div>\n<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\/ cron \/ max_execution_time Dit filter wordt elke keer aangeroepen dat de indexer een cron-proces start. Het laat toe om de max_execution_time (in seconden) van de cron indexer te wijzigen. Het cron-systeem van de plug-in zal tijdens het indexeren regelmatig controleren of de server max_execution_time niet wordt bereikt met een bepaalde snelheid (80%). Het voorkomt dat de indexer wordt verbroken als dit ...<\/p>","protected":false},"author":2,"featured_media":4996,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[44,57,43],"tags":[],"class_list":["post-4881","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-documentation","category-php-filters","category-wp-grid-builder","category-44","category-57","category-43","description-off"],"acf":[],"_links":{"self":[{"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/posts\/4881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/comments?post=4881"}],"version-history":[{"count":3,"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/posts\/4881\/revisions"}],"predecessor-version":[{"id":5093,"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/posts\/4881\/revisions\/5093"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/media\/4996"}],"wp:attachment":[{"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/media?parent=4881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/categories?post=4881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/nl\/wp-json\/wp\/v2\/tags?post=4881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}