Before I use nginx and php-fpm, I used Apache, so when I wanted only one of my cron jobs to run without time execution limitation, I used these lines in my PHP code:
You can add request_terminate_timeout = 300 to your server's php-fpm pool configuration if you are tried all of solutions here.