Hi Guys,
I really hope you could help me I am just new in Oracle but my boss is forcing me to do scripting he said everything is available online. I tried to create but he said it was wrong maybe you can give me a helping hand.
This will be my crontab entry
#!/bin/sh
#* * 1 1,4,7,10 * /root/bin/OLP-Cleanup.sh
And this will be script run by OLP-Cleanup.sh
find /root/archive -mtime +90 -exec rm {} \;
He said this wil delete all the files in Archive?
Any suggestions? Thanks!
/bong
|
Go4Expert Founder
|
![]() |
| 28Apr2010,10:50 | #2 |
|
#* * 1 1,4,7,10 *
Do you have any idea what that number actually mean? |
|
Newbie Member
|
|
| 28Apr2010,10:56 | #3 |
|
My intentions is to run the script on 1st day of Jan, Apr, Jul, oct. Is it wrong?
I got this as reference from somewhere at that interval. * * * * * command to be executed - - - - - | | | | | | | | | +----- day of week (0 - 6) (Sunday=0) | | | +------- month (1 - 12) | | +--------- day of month (1 - 31) | +----------- hour (0 - 23) +------------- min (0 - 59) |
|
Go4Expert Founder
|
![]() |
| 28Apr2010,11:11 | #4 |
|
No it is right but you should specify the hour and minute if you want it to run only once.
So now the question comes what is the issue? If it deletes all the files means your script contains error. |
|
Newbie Member
|
|
| 28Apr2010,11:45 | #5 |
|
hmm actually we haven't tried this yet. based from my boss assumption he thought this may not work.
But I demanded that this will not delete the file cause I set the run command to delete files +90 days old only. Just to make sure before he gets back I want to get a second opinion or if you have a better approach for the said purpose? Thanks! |
|
Go4Expert Founder
|
![]() |
| 28Apr2010,11:46 | #6 |
|
This will make the script to run after 90 days but not sure what it will do when run is the question.
|

