Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Crontab frustration running .pl
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="scoopz" data-source="post: 53961" data-attributes="member: 3619"><p>[Originally posted on cubeowners forum but no help from there so apologies to anyone who may have read this on another site]</p><p>My ISP keeps changing IP address every few days even though they say it should remain steady for a few months at least. I have a DNS2GO account from back inthe day when i used a PC running windows. That had a simple tray prog that sat sending heartbeats to DNS2Go's system and everytime an IP change happened my domain <a href="http://scoopz.d2g.com" target="_blank">http://scoopz.d2g.com</a> would be updated to point to my new IP.</p><p>I've been trying to get DNS2Go to work for ages on my Mac (OS X 10.3) and finally found out they have a perl version available. I downloaded this, set up the files but it failed to run, so i updated to perl 5.8.5 and joy, I can now manually start the script in terminal:</p><p>[CODE]</p><p>G4Cube:/Library/Dns2go scoopz$ perl online.pl</p><p>Success</p><p>[/CODE]</p><p>and this will update my IP with DNS2Go's system.</p><p>Right all i want to do now is set this to run every 5 minutes. Some investigation and I figure out that i need to add an entry to the crontab to execute this. I used pico to edit the main system crontab:</p><p>[CODE]G4Cube:/Library/Dns2go scoopz$ sudo pico /private/etc/crontab[/CODE]</p><p>which looks like this:</p><p>[CODE]# /etc/crontab</p><p>SHELL=/bin/sh</p><p>PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin</p><p>HOME=/var/log</p><p>#</p><p>#minute hour * *mday * *month * wday * *who * * command</p><p>#</p><p>#*/5 * ** * * * * * * * * * * * * * * * root * */usr/libexec/atrun</p><p>#</p><p># Run daily/weekly/monthly jobs.</p><p>15 * * *3 * * * * * * * * * * * * * * * root * *periodic daily</p><p>30 * * *4 * * * * * * * * * * * 6 * * * root * *periodic weekly</p><p>30 * * *5 * * * 1 * * * * * * * * * * * root * *periodic monthly[/CODE]</p><p>and then i added the following line to the bottom:</p><p>[CODE]*/5 * ** * * * * * * * * * * * * * * * root * */Library/dns2goperl/online.pl[/CODE]</p><p>But it doesn't work.</p><p>Any ideas guys & girls?</p><p>Whilst running:</p><p>[CODE]</p><p>G4Cube:/Library/Dns2go scoopz$ perl online.pl</p><p>Success[/CODE]</p><p>in that directory it all works fine, but if i go to another directory and run (what i thought would be exactly the same as running the above):</p><p>[CODE]G4Cube:/ scoopz$ perl /Library/Dns2go/online.pl </p><p>Undefined subroutine &main::DNS2GoUpdate called at /Library/Dns2go/online.pl line 10.[/CODE]</p><p>it now returns the same error i was getting before i updated to perl 5.8.5</p></blockquote><p></p>
[QUOTE="scoopz, post: 53961, member: 3619"] [Originally posted on cubeowners forum but no help from there so apologies to anyone who may have read this on another site] My ISP keeps changing IP address every few days even though they say it should remain steady for a few months at least. I have a DNS2GO account from back inthe day when i used a PC running windows. That had a simple tray prog that sat sending heartbeats to DNS2Go's system and everytime an IP change happened my domain [URL=http://scoopz.d2g.com]http://scoopz.d2g.com[/URL] would be updated to point to my new IP. I've been trying to get DNS2Go to work for ages on my Mac (OS X 10.3) and finally found out they have a perl version available. I downloaded this, set up the files but it failed to run, so i updated to perl 5.8.5 and joy, I can now manually start the script in terminal: [CODE] G4Cube:/Library/Dns2go scoopz$ perl online.pl Success [/CODE] and this will update my IP with DNS2Go's system. Right all i want to do now is set this to run every 5 minutes. Some investigation and I figure out that i need to add an entry to the crontab to execute this. I used pico to edit the main system crontab: [CODE]G4Cube:/Library/Dns2go scoopz$ sudo pico /private/etc/crontab[/CODE] which looks like this: [CODE]# /etc/crontab SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin HOME=/var/log # #minute hour * *mday * *month * wday * *who * * command # #*/5 * ** * * * * * * * * * * * * * * * root * */usr/libexec/atrun # # Run daily/weekly/monthly jobs. 15 * * *3 * * * * * * * * * * * * * * * root * *periodic daily 30 * * *4 * * * * * * * * * * * 6 * * * root * *periodic weekly 30 * * *5 * * * 1 * * * * * * * * * * * root * *periodic monthly[/CODE] and then i added the following line to the bottom: [CODE]*/5 * ** * * * * * * * * * * * * * * * root * */Library/dns2goperl/online.pl[/CODE] But it doesn't work. Any ideas guys & girls? Whilst running: [CODE] G4Cube:/Library/Dns2go scoopz$ perl online.pl Success[/CODE] in that directory it all works fine, but if i go to another directory and run (what i thought would be exactly the same as running the above): [CODE]G4Cube:/ scoopz$ perl /Library/Dns2go/online.pl Undefined subroutine &main::DNS2GoUpdate called at /Library/Dns2go/online.pl line 10.[/CODE] it now returns the same error i was getting before i updated to perl 5.8.5 [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Crontab frustration running .pl
Top