Use curl to load a page every 5 seconds
Hello, thanks for taking the time to read my post.
I am new to Linux. My distro is Ubuntu server 9.04 (no gui). I have a php file that updates images when it runs. I want to create a script to do this with curl. I have tested and using curl gives me the desired update, but I don't know how to script this so that I don't have to run it manually from the cli. I was using vb script and ie to do this on win2k3, but ie kills the cpu, and curl barley raises cpu usage so it would be great if I could script curl to load this page every 5 seconds. Will vb script work on Ubuntu? If there is a script genius reading who knows how to set this up please share, I will be very grateful. Also, I know this is not the right way to do this, but it is the only way possible for now. |
|
Quote:
I succesfully created a perl script to do this, but it would be nice if I could set a cron job to start the script/check to see if the script was running, and if not start it |
I would write a bash script with an infinite loop including:
sleep 5 <check if the perl script is running> <if not, run it> [EDIT] at first I wrote wait 5 instead of sleep 5. Probably I was too sleepy, sorry for that :confused: |
Quote:
Thanks everyone:) |
All times are GMT -5. The time now is 12:03 AM. |