syathm
asked on
How can I schedule a Oracle Procedure in Unix
I would like to run a procedure in Oracle once in a month.
How can I do this
How can I do this
If the oracle user doesn't have permission to use cron, you can add them to cron.allow OR have root's crontab kick off the command with
minute hour monthday * * su - oracle -c /path/to/script
If your script doesn't send stdout & stderr to a log file itself, you can redirect the output within cron; Otherwise, any output will be sent to the owner of the cron job as a mail message. (I hate it when that happens, as noone ever reads their unix mail file, and they just grow forever ;-)
minute hour monthday * * su - oracle -c /path/to/script
If your script doesn't send stdout & stderr to a log file itself, you can redirect the output within cron; Otherwise, any output will be sent to the owner of the cron job as a mail message. (I hate it when that happens, as noone ever reads their unix mail file, and they just grow forever ;-)
syathm, did that answer your question? If you need more explanation of cron, please let me know.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:
- Answered by JYoungman
Please leave any comments here within the next 7 days
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
tfewster (I don't work here, I'm just an Expert :-)
I will leave a recommendation for this question in the Cleanup topic area as follows:
- Answered by JYoungman
Please leave any comments here within the next 7 days
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
tfewster (I don't work here, I'm just an Expert :-)
Finalized as proposed
modulo
Community Support Moderator
Experts Exchange
modulo
Community Support Moderator
Experts Exchange
As Oracle, do `crontab -e`
Insert a line:
minute hour monthday * * /path/to/script
Remember that cron doesn't use your .profile etc, so ensure the script explicitly sets all paths & variables that it will need.
(man cron & man crontab for the full info :)