| 3:03 pm on Jul 26, 2008 (gmt 0)|
sure. cronjobs are set up with
crontab -e -u username
where username is the user the cron should be executed under.
m h dom mon dow command
so, let's say you want to run your script every 30 minutes, just put in a line
0,30 * * * * /var/www/myscripts/update-credits.pl
as for the perl-script itself, you basically copy it to the server into the cgi-bin, make sure you used unix-linebreaks and chmod it to 755.
but you don't necessarily need a perl-script for a cronjob, you can also use a php-script and call it using lynx or wget. that'll invoke the script and you can do your updates.
| 5:08 pm on Jul 26, 2008 (gmt 0)|
Where to find information about cronjobs? Do you really need to ask? google. ;)
Many hosts have a control that makes setting up cronjobs very simple.
| 5:12 pm on Jul 26, 2008 (gmt 0)|
unix-linebreaks and chmod it to 755.
755 is for a CGI script. For a script run by a cronjob 700 (or lower) is advisable. It should also not be put in the public cgi-bin if possible. It should be in a folder that is not web accessible, above the root if at all possible. If that is not possible the cgi-bin should be the last resort but don't chmod to 755 unless the script will not run with lower permissions.
| 5:26 pm on Jul 26, 2008 (gmt 0)|
ah, you're right, I was a little off and kept writing how to put a perl script on a website :)
| 6:55 pm on Jul 26, 2008 (gmt 0)|
Thnks so much for the info! I have looked this up Janharders and now know which way to proceed (I hope) LOL
perl_diver, LOL wasnt asking about cronjobs. Re-read my post (second paragraph) ;)
| 7:27 pm on Jul 26, 2008 (gmt 0)|
|perl_diver, LOL wasnt asking about cronjobs. Re-read my post (second paragraph) ;) |
oops.... my bad. Thanks for having a sense of humor. :)
| 7:42 pm on Jul 26, 2008 (gmt 0)|
LOL no worries :) Life would be too boring without one ;)