Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to pass a variable to the shell script and crontab?

VPSJan 20 2007 — edited Jan 22 2007
Friends,

here is my script.....


exp userid=username/password@realdb file=/u02/logical_backup/abc_+$date+.dmp log=/u02/logical_backup/abc_+$date+.log owner=oraadmin statistics=none

i want the exported file name as abc_2101.dmp and abc_2101.log (2101 is a date and month)

I want to execute this script daily at 02:00 AM.
so that i edited the crontab -e as....


00 02 * * * ./u02/script/dailybkp.sh


Now what i want is....

1. is the steps are correct for crontab -e?
2. Is the script of the crontab will execute daily at 02:00 AM?
3. how can i rename the .log filename and .dmp file name daily according to the date. for example abc_2001 is today's date and month.how can i replace with the variable.

thanks
sathyguy
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2007
Added on Jan 20 2007
5 comments
1,180 views