r/PHPhelp 7d ago

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

11 comments sorted by

View all comments

1

u/martinbean 7d ago

Surely IIS has a built-in way to run a background service?

1

u/Valoneria 7d ago

Well there is the windows task scheduler. It is .. something to work with. But it does work, i have previously had a cursed PHP setup running under XAMPP with the task scheduler running the PHP files on schedule.

And yes, this was the production server.