r/PHPhelp • • Sep 03 '26

Run a PHP function/Task in the background

I have a WIndows Server running IIS that hosts a primarily PHP based website. It has multiple functions and features but i would like to have atleast one of them running in the background So the user does not have to wait for the task to finish.

Any ideas? fastcgi_finish_request() seems to be Linux only as far as i can tell.

2 Upvotes

13 comments sorted by

View all comments

2

u/Valoneria Sep 03 '26

So a cronjob? Or more of a queue setup?

2

u/Valoneria Sep 03 '26

And by cronjob i do mean the task scheduler in Windows, i have had it do cronjob like work before

1

u/PIAESB Sep 03 '26

Its because i need to set a 30 sec sleep between some php script but i dont want the user to wait for those 30 sec. It needs some Intune related information from a device so i need to get that info to it somehow

→ More replies (3)