I’m uncertain about how to start with this task. Is it feasible to create a backend script that operates continuously, for instance, sending an email every minute? I’m looking for a solution in PHP that does not require the webpage to remain open in a browser, so the server (in my case, GoDaddy) handles it automatically. I don’t need the script itself; I’m just looking for the appropriate technology to accomplish this!
you might want to look into cron jobs. it’s like scheduled task that runs your script at set intervals. on Godaddy’s cPanel, you can set up cron jobs easily to execute your PHP scripts without keeping a browser open. perfect for your use case!
Another approach is to utilize a PHP-based job queue system like Laravel’s Queue or a standalone solution such as Beanstalkd, which can handle periodic tasks without relying on cron. This method allows you to manage and queue tasks, making it more scalable if your script’s demands grow. Additionally, you could use Long Running PHP scripts executed from the command line, but ensure to handle memory management well to avoid server overload, especially with repeated tasks.