Monitor cron jobs and Windows schedules
Crontab and Curl
Assuming you want to monitor a cron job, you could take the URL presented to you after creating a Job Monitor and add it to your crontab. For example like this:
0 * * * * /my/hourly/backup/script.sh && /usr/bin/curl -s https://ping.allgood.systems/l/j/GAkmzGhsRNu-YHOCcLHmQQ
If curl
is not available on your system, you could also use wget
:
/usr/bin/wget -q --spider https://ping.allgood.systems/l/j/GAkmzGhsRNu-YHOCcLHmQQ
HEAD vs. GET
To send your "heartbeat" for a job monitor, it doesn't matter whether you make a HEAD (as in wget
's --spider
or curl
's --head
option) or a GET request.
Windows Task Scheduler
Similarly, when working with the Windows Task Scheduler, either define a PowerShell command directly via the Actions tab or add it to the end of the script/program you are already calling.
PowerShell example:
Invoke-WebRequest https://ping.allgood.systems/l/j/GAkmzGhsRNu-YHOCcLHmQQ