Link to home
Start Free TrialLog in
Avatar of anumoses
anumosesFlag for United States of America

asked on

dbms job submit

I want to schedule the job to run on the 1st of every month. I have the code and wanted to be sure if this is correct before I schedule.

runs on september  1st 2014 and there on every 1st of the month

--dbms job run every 1st of the month for monthly proposed annual goal report
DECLARE
    x   NUMBER;
BEGIN
dbms_job.submit(job => X,
                what => 'mthly_prop_goal_imp_prc;' ,
                next_date => trunc(add_months(sysdate, 1), 'mm'),
                interval => 'trunc(add_months(sysdate, 1), 'mm')',
                no_parse => true);
commit;
end;
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anumoses

ASKER

just one question though

interval => 'trunc(add_months(sysdate, 1), 'mm')',

does mm has to be ''mm''
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks