Welcome to WebmasterWorld Guest from 22.214.171.124 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe and Support WebmasterWorld
Shell Script to Write Cron BoneHeadicus msg:440700 6:54 pm on Feb 14, 2001 (gmt 0) I was wondering if it is possible to use a shell script to set up a few crontab's. I only know the most basic telnet procedures.
I want to set up weblog to run everyday in folder 'X'. Then once a week I would like a cron job to wipe out folder 'X' so the weblog files dont get too big.
sugarkane msg:440701 7:43 pm on Feb 15, 2001 (gmt 0)
I'm not quite sure what you mean. Sure, you can put a crontab command in a shell script - you can put any valid command you like in one - but I'm not sure if that's what you're asking.
There's some info on crontab
here [ rt.com] and here [ rt.com]. littleman msg:440702 7:47 pm on Feb 15, 2001 (gmt 0)
Air gives a walk through here [ webmasterworld.com]. BoneHeadicus msg:440703 7:47 pm on Feb 15, 2001 (gmt 0)
Thanks for your response SK.
I use the same scripts in all the sites I do so I want to be able to install all the stuff from a single shell script.
I want Weblog to run everyday at 12 and also once a week I want the folder that contains the weblog reports to be wiped out so it starts fresh again
BoneHeadicus msg:440704 8:02 pm on Feb 15, 2001 (gmt 0)
To really clarify I want to SET-UP a cron from a shell script. sugarkane msg:440705 11:51 pm on Feb 19, 2001 (gmt 0)
Once you've got a script that does whatever job you want scheduling, whether it be to delete a folder, run a program, whatever, just create your 'schedule' file as shown in Air's walk-through and put the crontab command in a script ie