pixelwarrior
Technical User
*newbie alert!*
OK, I've got the basic idea. I have managed to write a simple cron job and implement it....every day @ 2:00 my error_log is copied to a new file, and then it and my access_log are truncated back to 0. I'm happy with that.
Now, here's where I need some help. I also need to automate a perl script to run daily, let's call it blah.pl. It is a command-line script (i.e. it must be run thru a terminal session to my host rather than thru a browser). That would be easy enough using the 'perl' command and the full path to the script. However, the script requires a cfg file, let's call that blah.cfg. When I run the blah.pl manually, it then prompts me for the location of blah.cfg, which is actually in the same directory as blah.pl.
My question is, how do I accomplish that in the textfile I create for my cronjob? I tried this:
0 1 * * * /user/ blah.cfg
but it did nothing. Do I need to give the full path to blah.cfg? Or should I add a % character in front of blah.cfg? Or maybe I can't do this at all and I'm just retarded?
Any help you can provide would be greatly appreciated.
pixel_warrior@hotmail.com
OK, I've got the basic idea. I have managed to write a simple cron job and implement it....every day @ 2:00 my error_log is copied to a new file, and then it and my access_log are truncated back to 0. I'm happy with that.
Now, here's where I need some help. I also need to automate a perl script to run daily, let's call it blah.pl. It is a command-line script (i.e. it must be run thru a terminal session to my host rather than thru a browser). That would be easy enough using the 'perl' command and the full path to the script. However, the script requires a cfg file, let's call that blah.cfg. When I run the blah.pl manually, it then prompts me for the location of blah.cfg, which is actually in the same directory as blah.pl.
My question is, how do I accomplish that in the textfile I create for my cronjob? I tried this:
0 1 * * * /user/ blah.cfg
but it did nothing. Do I need to give the full path to blah.cfg? Or should I add a % character in front of blah.cfg? Or maybe I can't do this at all and I'm just retarded?
Any help you can provide would be greatly appreciated.
pixel_warrior@hotmail.com