Reputation: 2162
Is there a way to make a function "PHP/JS" or a cron job to call a link/href every 12 hours for example?
Thanks in advance!
Upvotes: 1
Views: 117
Reputation: 1965
To run a PHP script via cron job every 12 hours, you can do the following:
0 */12 * * * curl -s -o /dev/null http://example.com/your-php-script.php
Upvotes: 1
Reputation: 188114
There are attempts at this, e.g.
Otherwise it might be simpler to just write a traditional cron script, if possible.
Upvotes: 0
Reputation: 1786
Of course you could do it yourself with a cron job, but there are monitoring services that will check that a page is accessible and returns the expected data, and email or text you if it fails.
Upvotes: 0