Cron tab time generation script

Hi folks,

Everyone knows about crontab, what i am looking for a script where i will define hour,minute and day and it will generate crontab complete time entry, i have seen many website generating crontab entry and my question is that is there any shell script that can do same work.


20 09 * * 5 command

Hello,
assuming three command line parameters as:
$cronscript.sh <hr> <min> <day>

the script would be:

HR=$1
MIN=$2
DAY=$3

crontab -l > cron_now
#add new cron into cron file
echo "$MIN $HR * * $DAY script-which-needs-to-be-added-to-cron" >> cron_now
#install the new cron_now file
crontab cron_now
#remove the temp cron_now file
rm cron_now

Hi,

I am talking about this, do we have some shell script like that?

http://www.thepcmanwebsite.com/crontab_generator.shtml

Hi there,
yes, my script does that exactly.
ok, may i know exactly what you like to do. do you want to input the min, hr and day thru cmd line arg or thru reading from user? could you please provide more info..

Thanks for your kind reply. Yes i want to input minute and hour and month, day of monday, day of week from command line, so it will show complete output.