Long running tasks in a plugin: wp-cron vs REST API callback [closed]

Cron is your best best, and it is the right tool to perform long-running tasks in the background. If set up correctly (via CLI), it also does not interfere with HTTP, does not lock up PHP workers, has its own memory and time allocation.

If WP Cron, for whatever reason, is disabled on some hosting environment, that is a problem of that hosting environment, and not yours. You can address it in your readme or troubleshooting guide by sending them to their hosting support.

If you’re going to do a lot of background jobs, then something like Action Scheduler may also be a good fit, but it still requires WP Cron to be correctly configured or offloaded to AS completely. IIRC WooCommerce and some other big plugins bundle and use this extensively.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)