{"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\/en\/wp-grid-builder\/filter-cron-max-execution-time\/","title":{"rendered":"Filter cron max execution time"},"content":{"rendered":"
\n\t
\n\t\t
\n\t\t\t
\n
\n

\/cron\/max_execution_time<\/h1>\n<\/div>\n<\/div>\n
\n

This filter is called everytime the indexer start a cron process.<\/p>\n

It allows to modifies the max_execution_time<\/code> (in seconds) of the cron indexer.<\/p>\n

The cron system of the plugin will frequently check, when indexing, if the server 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 max_execution_time<\/code> thanks to this filter.<\/p>\n\n\n\n\n
Argument<\/td>\nType<\/td>\nDescription<\/td>\n<\/tr>\n
$execution_time<\/td>\ninteger<\/td>\nExecution time in seconds<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\n

[pastacode lang=”php” manual=”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’wp_grid_builder%2Fcron%2Fmax_execution_time’%2C%20’prefix_cron_max_execution_time’%2C%2010%2C%201%20)%3B” message=”” highlight=”” provider=”manual”\/]<\/p>\n<\/div>\n<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"

\/cron\/max_execution_time This filter is called everytime the indexer start a cron process. It allows to modifies the max_execution_time (in seconds) of the cron indexer. The cron system of the plugin will frequently check, when indexing, if the server max_execution_time is not reached at a certain rate (80%). It prevents to break the indexer if this…<\/p>\n","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\/en\/wp-json\/wp\/v2\/posts\/4881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/comments?post=4881"}],"version-history":[{"count":3,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4881\/revisions"}],"predecessor-version":[{"id":5093,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/posts\/4881\/revisions\/5093"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/media\/4996"}],"wp:attachment":[{"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/media?parent=4881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/categories?post=4881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/the7kennisbank.nl\/en\/wp-json\/wp\/v2\/tags?post=4881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}