简体   繁体   中英

Wordpress Cron Job 500 Internal Server Error

I'm running a cron job, to insert a properties from a Prop-Space API,

I'm using wp_insert_post method to insert properties in the wp_post table, but after 150 Insertion my server crashed and say 500 Internal Server error. Script is running fine on localhost can any one have a solution for this ?

If its timeout issue, then adding following lines in your cron job file might be helpful

ini_set( "display_errors", 1);
set_time_limit(0);
ignore_user_abort(true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM