You are not logged in.
Pages: 1
i have a python script that updates my ip address with zoneedit.
i would like to run it every hour from cron or something similar.
i thought i set it up right in webmin, but it doesnt work.
so.... any suggestions?
Offline
I assume your python script runs correctly when you run it manually? If so, post your cron entry so we can take a look.
Offline
why use a python script? Just use wget...
http://wiki2.archlinux.org/index.php/Zo … namic%20IP
my cron example is at the bottom.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
as root do
crontab -e
then make an entry like this...
01 * * * * /where/your/script/lives/script.py
This will run the script the first minute of every hour.
EDIT
LOL. while I was typing this up, two people beat me to it.
Offline
Yep, when i run the script from a terminal , it works.
here is the entry
@hourly python /home/nephish/ipupdate.py
by the way, what editor is that when you use crontab -e? is that vim ? ick. any way to get it in gedit, or nano, or something?
thanks for all of the quick responses by the way !
Offline
i like the wget thing from the wiki, but i am hosting 4 zones now that are just one line in the python script. i want to learn some python anyway because i heard that it is easier than perl.
thanks again.
Offline
export EDITOR=/bin/nano
crontab -e
might work...or whatever the path is..
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Yep. crontab -e opens it in vi. I dunno how to get it to open in nano or something else. I don't think you can but....not sure. never tried.
vi is your friend!
Offline
oh, wait.
got it guys,
thanks
Offline
Pages: 1