Many Thanks Rob, Noooooo, It's not sending SMS every 5 Min I'll be dead by then :) , It's just checking if something gone wrong only then it send an SMS,
Your right, I should send it to my DBA to create the right schedule for it, & sure I don't want it to work on weekends, Thanks again & Best Regards, Iyad 2009/6/21 rob wolfe <rob.wo...@oraclegeeks.com> > > Personally, I am not a huge fan of dbms_job for something like this > because the interval parameter (which is a date expression represented > as a string) has to be smart enough to know when the next time to run > should be. In your case that means that you likely have to write a > function that knows that if it is between 8 am and 9 pm it should return > a date value 5 minutes in the future and if it is after 9 pm it should > return 8 am the next morning (or perhaps monday morning if it is a > friday and do you really want it to run on holidays?). Now granted this > isn't really a big deal but it is one more function to write. > > If you are using 10g or later I COULD suggest using the more capable > dbms_scheduler (docs here: > http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm > ) > but to be honest I think that you would be better off using a real > scheduler if you have access to one on your system. If you get really > lucky you can hand your script to to your local sysadmin with a note > that says "please schedule this to run every 5 mins from 8 am to 9 pm > monday to friday except for statutory holidays" and they will make it > happen. > > One small comment, if my database was sending me an SMS every 5 minutes > 13 hours a day it had damned well better be telling me useful stuff :-) > > Rob > > Mouhammed Iyad wrote: > > > > > > Have a Nice Morning, > > > > Job Interval > > > > I have a procedure "SMS_PRO" it send SMSs to me & to other Employees > > in my company, > > I want to put it in a Job but it should work every 5 Minits from 08:00 > > AM to 09:00 PM, > > > > what should I use in the Interval to do so??? > > * > > > > begin > > > > *sys.dbms_job.submit(job => :job, > > what => 'BEGIN > > SMS_PRO; > > END;', > > next_date => to_date('21-06-2009 08:00:00', 'dd-mm-yyyy hh24:mi:ss'), > > *interval* => ???????); > > *commit*; > > *end*; > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en -~----------~----~----~----~------~----~------~--~---