If you are referring to the 524 error returned from Cloudflare, the timeout is 100 seconds and can only be changed with an Enterprise plan - a Pro plan is not enough.
You will need to work around the problem by doing one of…
- setting the DNS record to “DNS only”
- changing your cron job to request through a special DNS record set to “DNS only”
- changing your cron job to use the IP address of your server, or localhost, or other non-Cloudflare routed solution
- change the script so you can start it with a request, then poll it for completion if needed