-
schedule a db job to run every Monday, Wednesday and Sunday
Hi,
What's the best way to schedule a db job to run every Monday, Wednesday and Sunday?
For example: the following only run once every Sunday.
VARIABLE jobno number;
BEGIN
DBMS_JOB.SUBMIT(
:jobno,
'My_precedure;',
trunc(SYSDATE)+1+3/24, --execute 1st time at 3am tommorrow
'NEXT_DAY(TRUNC(SYSDATE), ''SUNDAY'')+ 3/24'); --execute at 3am every Sunday
COMMIT;
END;
/
-
Something similar to thje following ought to work ...
Code:
LEAST(
NEXT_DAY(TRUNC(SYSDATE),''SUNDAY'')),
NEXT_DAY(TRUNC(SYSDATE),''WEDNESDAY'')),
NEXT_DAY(TRUNC(SYSDATE),''MONDAY''))
)+ 3/24')
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|