Help with advice, there is a code that receives data and if they go beyond the previously specified standards, a notification is sent that warns me. But this code works if the tab with this address is open. But as you understand, keeping the computer constantly on is impractical. Is there any way to make this code run on the server independently, without necessarily opening the tab? At the same time, all functions were kept working. After all, the server is still in working condition all the time.
|
1 answer
To solve your problem, you must use CRON (Task Scheduler), that is, you insert the verification code in a specific file, and through the hosting panel (cPanel, IPS manager, etc.) set up cron (for example) every 30min and server each time will call this file, thus the file will check what you need and will send a report to you. You can read more here.
|