Skip to content
Advertisement

Cron every minute to trigger url via CURL

I want to set a CRON task to trigger an URL every minutes (via CURL). That seems pretty simple, I searched and wrote this :

* * * * * curl -—silent "https://urltotrigger.com/page.php" >/dev/null 2>&1

I added that to the crontab -e and saved. But it seems that the url is not triggered.

Don’t understand why, everything seems correct? Can you help me please? Thx.

Advertisement

Answer

Your cron entry is wrong. If you need it to be run every 1 minute, it should be like this:

*/1 * * * * curl -—silent "https://urltotrigger.com/page.php" >/dev/null 2>&1
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement