Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I put "load" in quotes because I'm not trying to open up a website via terminal. I have a PHP script on a web server that logs to a text file when it has been loaded. I'd like to set up a cron on a battery powered linux system to load the URL for this PHP script once per minute. I'd like to do this so that it runs until the battery dies and I can see how long it ran for by viewing the txt file on my server.

I'm trying to find out if there is something like a "ping" command for a specific URL, not just a server or IP. Hopefully that makes sense. =)

share|improve this question
    
possible duplicate of How do I set up a Cron job? –  papukaija Jul 10 '13 at 17:49
    
@papukaija That question doesn't answer how to access the URL. –  Eric Carvalho Jul 10 '13 at 17:57
    
Perhaps curl or wget? –  belacq Jul 10 '13 at 19:09

1 Answer 1

In your battery powered device run crontab -e then add this line at the end:

* * * * * wget -q -O- http://www.example.com/full/URL/path.php > /dev/null

It will run every minute and the HTML code returned by your PHP script (if any) will be simply discarded.

share|improve this answer
    
wget! I don't know how I forgot about that... Thanks for even providing the whole crontab line needed. It's more than I was even asking for! =) –  user174148 Jul 10 '13 at 19:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.