Run a job every 30min but only from 6am to 6pm

I have a job that runs every 30 mins to process orders, and email failures. I only want this job to run from 6or 7am to 6pm M-F. I have other jobs that run once a day starting 1 minute past midnight. and and 4am. I do not want any conflicts as the both read the same tables. Using Enterprise Manager in 10g, I can only see how to schedule a job to repeat and start and stop but I want it to resbmit the schedule.
Is this possible or will I have to schedule a 25 jobs to run ever 24hrs?
thanks
bj

The job that runs every 30 minutes processes orders and changes the status, the midnight job runs the same stored procedure and then does a data reconciliation at the start before running accounting. The conflict could be data conflict. If both job start after midnight, the order job uses the order end date which would be the day before and an order that should be included in the nightly accounting run will not be. Although the system by default does not allow a user to enter an order end date outside of the 6AM to 6PM time range, we have had people use SQL*Plus to fix something and change the end date to 11:45PM thinking they entered 11:45AM.
I think I have found an answer to my problem. I will have a job run a PL/SQL block that if the time is right execute the procedure. So far my test of the script by using a shorter time frame is working.
my new job would look like this:
begin
If to_char(sysdate,'HH24:MI:SS') >= '06:00:00' and to_char(sysdate,'HH24:MI:SS') <= '18:00:00'then
proc_fb_process_ord();
end if;
end;
my test case is :
DECLARE
v_sender VARCHAR2 (100) := '[email protected]';
v_recipients VARCHAR2 (1000) := '[email protected]';
v_subject VARCHAR2 (250) := 'NG-DB01 TEST';
v_message VARCHAR2 (4000);
begin
case
when to_char(sysdate,'HH24:MI:SS') >= '12:00:00' and to_char(sysdate,'HH24:MI:SS') <= '12:30:00'then
v_message := to_char(sysdate,'HH24:MI:SS')||' Between Time';
when to_char(sysdate,'HH24:MI:SS') < '12:00:00' then
v_message := to_char(sysdate,'HH24:MI:SS')||' Before Time';
when to_char(sysdate,'HH24:MI:SS') > '12:30:00'then
v_message := to_char(sysdate,'HH24:MI:SS')||' After Time';
end case;
demo_mail.mail (v_sender, v_recipients, v_subject, v_message);
end;
/

Similar Messages

  • ODBC fails but only from ASP page (12154)

    I have a working Win2k/MDAC 2.6 box, that can connect perfectly to an Oracle 8.1.7 on another machine. I can TNS ping this host, I set up an ODBC DSN and I can connect from the Oracle ODBC Test program. I wrote a simple script (see below) to test the connection, and run it as a Windows script (i.e. double click on the file) and it runs perfectly. All is great.
    BUT, when I copy the exact same script into an ASP file (surround the script the the "<%" and "%>" delimiters) and run it, I get this:
    ORA-12154 TNS could not resolve service name.
    Anyone have any ideas why this script fails but ONLY from ASP??
    Here is my simple script:
    dim rs, conn
    set conn = CreateObject("ADODB.Connection")
    conn.open "ora817"
    Thanks very much,
    Marc Fairorth

    I am using asp connecting an oracle 8.1.5
    Using this :
    Set Conn=Server.CreateObject("ADODB.Connection")
    Set RS=Server.CreateObject("ADODB.RecordSet")
    Conn.Open Connection
    RS.open SQL1, Conn
    The only difference to your script is the server option
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Marc Fairorth ([email protected]):
    I have a working Win2k/MDAC 2.6 box, that can connect perfectly to an Oracle 8.1.7 on another machine. I can TNS ping this host, I set up an ODBC DSN and I can connect from the Oracle ODBC Test program. I wrote a simple script (see below) to test the connection, and run it as a Windows script (i.e. double click on the file) and it runs perfectly. All is great.
    BUT, when I copy the exact same script into an ASP file (surround the script the the "<%" and "%>" delimiters) and run it, I get this:
    ORA-12154 TNS could not resolve service name.
    Anyone have any ideas why this script fails but ONLY from ASP??
    Here is my simple script:
    dim rs, conn
    set conn = CreateObject("ADODB.Connection")
    conn.open "ora817"
    Thanks very much,
    Marc Fairorth<HR></BLOCKQUOTE>
    null

  • All my email has disappeared from iCloud.  I did not delete it, and now it's working again, but only from 28 August 2013.  What happened to my old emails? How do I get them back? thanks

    All my email has disappeared from iCloud.  I did not delete it, and now it's working again, but only from 28 August 2013.  What happened to my old emails? How do I get them back? thanks

    Have you checked whether the emails are visible at http://icloud.com ? If they are, it's a problem between your Mac and the website; sign out in System Preferences>iCloud and sign back in again.
    If they aren't, then it's a server problem and you need to contact Support. If you currently happen to have AppleCare, either because you recently bought Apple hardware or have paid to extend the inititial period, you can contact them here:
    http://www.apple.com/support/icloud/contact/
    You will need the serial number of the covered hardware.
    If you are not covered by AppleCare, then - in common with other free email services - there is no free support and you may be asked to pay a fee; if so you should argue that this is a problem they've caused (it's not the first time, by the way) and you shouldn't be charged.

  • I need to run the job  every 8th of the month

    Hello,
    Can you please help me out to run the oracle job every 8th of the month.
    Thanks in advace
    Kind reagrds,
    Nick

    Untested, but I'd say the repeat_interval clause of dbms_scheduler.create_job should be something like:
    'FREQ=MONTHLY;BYMONTHDAY=8;'

  • How to run a job every month

    Hi guys,
    I know it's not right to ask others to create code for me, but I searched for a while and still blank. Can someone show me how to run myPackage.myProcedure every first day of the month (eg, Jan 1, Feb 1, March 1).
    I am thinking use this function, but I don't see how..
    DBMS_JOB.SUBMIT (
    job OUT BINARY_INTEGER,
    what IN VARCHAR2,
    next_date IN DATE DEFAULT sysdate,
    interval IN VARCHAR2 DEFAULT 'null',
    no_parse IN BOOLEAN DEFAULT FALSE,
    instance IN BINARY_INTEGER DEFAULT any_instance,
    force IN BOOLEAN DEFAULT FALSE);
    Any suggestions are welcome,
    Thank you
    Mike

    How come the first test works and the second test cannot find the procedure?? I am very confused now.. Also, how do I post code with indents? LOL
    SQL> DECLARE
    4 begin
    5 PRICE_PKG.CREATE_BUFFER_TBL;
    6 end;
    7 /
    PL/SQL procedure successfully completed.
    SQL> DECLARE
    2 v_Job NUMBER;
    5 BEGIN
    6 DBMS_JOB.SUBMIT(
    7 v_Job,
    8 PRICE_PKG.CREATE_BUFFER_TBL,
    9 LAST_DAY(SYSDATE)+1,
    10 TO_CHAR(TRUNC(LAST_DAY(SYSDATE)+1) + (6/24))
    11 );
    12 END;
    13 /
    PRICE_PKG.CREATE_BUFFER_TBL,
    ERROR at line 8:
    ORA-06550: line 8, column 36:
    PLS-00222: no function with name 'CREATE_BUFFER_TBL' exists in this scope
    ORA-06550: line 6, column 4:
    PL/SQL: Statement ignored

  • FaxSTF fails to send - but only from my main user account!

    I bought FaxSTF in version 6 for OS 9, and version 10.5.3 for OS X. My woes with it in OS X are not so much of the kind that I've read while searching this area for answers; they are rather peculiar, and I suspect FaxSTF might not even be at fault (though I can't be sure). For what it's worth, let me also state up front that under OS 9 it worked almost rock-solidly. It was very, very versatile and amazingly reliable. Not so much in OS X; versatility and reliability are out the window. I'll explain:
    In my main user account ('alex', admin account) no matter which application I try to fax from, when I click on the blue throbbing 'Fax' button, it stops throbbing and becomes grey and nothing else happens. I can only dismiss the print dialog by clicking on 'Cancel'. There is nothing I have tried which can change this behavior.
    Things are better, though, in secondary, standard or admin user accounts on the same machines. From them, I can fax things with no problem whatsoever.
    This is the second powerbook on which this is happening: the other one is my TiBook 550MHz running Tiger, also. What it's meant basically is that when I need to send a fax, I have to:
    •save my document in a directory accessible by my other, secondary, accounts, then
    •use Fast User Switching (thank goodness for that) and through my other account ...
    •open the document (usually a PDF by now, so I only have to use Preview which loads fast enough) and
    •enter the fax number manually (since my Address Book database is not accessible by the secondary account) and click on Fax.
    Of course, if I need to keep track of sent faxes, I then have the additional step of exporting the fax into Fax format from FaxSTF from the secondary account, then over at my main account go into FaxSTF and import it for my records.
    Not so practical...
    Thankfully, FaxSTF is fine when receiving faxes while logged in my main account.
    I was hoping that some useful hints/help will be available through the Discussion Area, as opposed to SmithMicro customer support; they take up to months to reply to an incident posted on their web-driven database, and when they do, their responses are almost meaningless most of the time, assuring me that my problem is not really happening, and reminding me of the correct procedure for doing things (it's the very procedure that doesn't work with me, but often times they haven't even read/understood my incident post in the first place. Very polite people, though; I'll give them that!)
    As always, thanks in advance, people.

    I would look into if the ports the smtp is using are open at all
    if they are closed over 3g then it should work over wifi unles your wifi router block them too
    and of cause if you set the wrong encryption or some of the other smtp settings then that too would
    explain it

  • I have an HP Officejet 6500 E709N that I can't print from but only from my laptop

    This printer used to work great.  My desktop and laptop were both running Vista.  After a while it stopped printing from the laptop, but continued to print from the desktop.  I changed to Windows 7 for my laptop and it worked for a while then I couldn't consistently print from my laptop.  The desktop (HP desktop) never has a problem.  I recently got a new HP laptop with Windows 7 and the first couple weeks it printed fine, but now it still prints from the desktop but never directly prints from the laptop.  The Printer window says "user intervention required" but I can find no problems.  Again it ALWAYS prints from the desktop.  All computers are connected wirelessly through a wireless router.  Sometimes when I try to print from the laptop I will find it printed a day or two later.  i don't know when it prints and it doesn't always do it.  I have tried to uninstall and reinstall on both computers, I've tried the HP Print and Scan Doctor, and I've tried turning print sharing on and off all to no avail.  Can someone help me?  

    You are receiving the error in the print queue status window.  User Intervention on that screen can mean a number of things.
    Are the cartridges in the printer HP genuine or third party cartridges?  I have come across several posts that indicate the issue with this error on the computer was related to using third party cartridges as the problem went away after inserting genuine cartridges. 
    This post and this post indicate that faulty third party cartridges were at fault.
    This post indicates that logging out of the computer and rebooting it resolved the issue.
    You can also review this Microsoft Answer's post from a support engineer.  Method 1 and Method 2 have already been performed, so start with method 3.  The FixIt in method 4 is a different FixIt than what we have already tried.
    Let me know what happens.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • I keep getting an error message when I attempt to print: "Cannot load library LXBCPRP.DLL", but only from within Firefox.

    Within Firefox and websites visited within Firefox, whenever I try to print using my Lexmark Z605 printer, the error message "Cannot load library LXBCPRP.DLL, using default '' appears. The printer works fine from other programs and indeed worked fine from within versions of Firefox before 4.0.1, and I have even updated drivers from Lexmark, but the problem persists.

    Thanks for your time, but I maintain my position. There has been no problem with my printer from purchase (5+ years ago) until Firefox 4, in particular no problem with Firefox 3.x. I have no problem with ANY other applications I use now and have run through them all to check.
    Firefox 4.0.1 remains the prime suspect, but I am willing to try any fix that the wonderful members of Firefox community may care to suggest.

  • How to run a job in 1 session only?

    Hi,
    although I searched the forum and found some proposals close to my issue, I would like to ask just in case to be sure I have correct answer:
    [Q] I have a program (with attached transaction code) which usualy runs as a task in background job, but may be started in foreground also. What I need is to prevent possiblity to start it in two paralel sessions (as per server context, not per frontend).
    Is it possible and what is the proper way to do that?
    Many thanks in advance.
    Regards,
    Ivaylo Mutafchiev

    Yes, I believe that this is achieved by placing a lock on the program name during execution. Here is a sample.
    report zrich_0001 .
    call function 'ENQUEUE_E_TRDIR'
    exporting
    *   MODE_TRDIR           = 'X'
       name                 = sy-repid
    *   X_NAME               = ' '
    *   _SCOPE               = '2'
    *   _WAIT                = ' '
    *   _COLLECT             = ' '
    * EXCEPTIONS
    *   FOREIGN_LOCK         = 1
    *   SYSTEM_FAILURE       = 2
    *   OTHERS               = 3
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    check sy-subrc = 0.
    Regards,
    Rich Heilman

  • IPhone to iPhone not coming up as iMessages (but only from one person)

    I have an iPhone 4S and a contact of mine has a 5.  For some reason all my texts to/from him suddenly stopped coming up as iMessages and now only are text messages.  I get/send iMessages with other contacts.  I turned iMessags off and back on, powered my phone off/on, etc and that didnt work either.

    Sorry I don't have the answer, but same thing- my iPhone 4S and my son's iPhone4 all of a sudden stopped sending texts as iMessages- help please!! I can still send iMessages to other iPhones. Thx in advance!

  • Cannot print on LOCAL printer, but only from one application server

    Hello guys,
    we have a  case of user being unable to print directly on their own LOCAL printer from a certain application server. The status of their spool requests is stuck on "Waiting"/"Waiting for output formatter."
    If the print request is started either from the central instance or another application server, then everything works fine and a special window where you can choose your real local printer appears at the end and the request is printed. In the case of that "strange" application server this window doesn't appear at all. It seems that the printer daemon (SAPLPD) won't even execute in the background.
    The question is what can disturb SAPLPD of being properly triggered when the user fires a print out.. May be a certain port is blocked on our linux machine, where this application server (dialog instance) is running?
    Any other ideas?
    Many thanks,
    Polina

    hello Polina
       As you said its LOC print ,you need to install SAPSprint service on printer host ,this will try establish communication wit
    app server .
    Regards
    Arun.H

  • My font changes when I export to pdf, not on every page but only a few pages

    I am using the font Helvetica, light in my iBook.  It looks the same on every page in iBooks Author, but when I export it to PDF some of the pages look like they are written with font Helvetica bold.  Can anyone suggest a fix?  Thank you

    A number of threads dealing with issue have been posted over the past two weeks or so, I suggest a search may help you and also check out the More Like This column on the right.

  • Firefox Hangs every opening, but loads from internet to "home".

    After downloading Windows Live Essentials 2011 Firefox (and Windows Explorer) hangs on opening every time though it is my primary start page. I can open it by internet access (i.e. windows update) back to "home". Are there problems with live essentials?

    Try running Firefox in [[Safe Mode]]. If it functions properly in that configuration, then one of your add-ons is the culprit.
    Also, if you have some kind of security software installed which scans links like AVG Safe Search, AVG Link Scanner, McAfee Secure Search, McAfee Site Advisor, or some other kind of anti-phishing tool, try disabling it.

  • SMS arrives scrambled - but only from one sender

    Hi. Up until the day before yesterday (with no iOS updates in the interim), I was able to use my iPhone 3GS (iOS 5.1) as a mobile security key with my PayPal account - when I want to log in to my Paypal account or make a payment, a confirmation code is sent by SMS to my phone. This has all been working nicely and adds a layer of security to the use of my Paypal account.
    Until this morning when I went to make a payment and the SMS arrived but was totally scrambled. Instead of the usual "Your 6-digit code is....." message, it's all wacky characters like upside-down triangles, and characters from other languages like Greek and Russian. Tried turning phone off and on again and re-adding to Paypal account but problem persists.
    Googling indicates that this may be a problem with iPhone interpreting SMS rather than Paypal sending rubbish, however I can't find anything more recent than 2009 on this problem.
    Anyone know anything about this problem and how to fix it?
    Thanks

    Thanks Tom - that looks pretty similar. No resolution from the other link though. I'm in the UK and an Orange user.
    Like I said, all of the previous texts from Paypal have been standard characters so it's a mystery as to why they're so weird suddenly

  • My iphone 4 deletes texts as I send and receive them but only from 1 contact

    Hi all,
    I recently brought my first Iphone (4 8GB) 2 weeks ago and on monday I made a very stupid error and accidently reset my phone when syncing it to itunes (no idea how!!).
    My issue is although I managed to sort it out my phone it has been deleting text and iphone messages from 1 contact who I text the most. I have no idea why or how it's doing this and although its a relatively small issue its increasingly annoying and I have not a clue how to correct it! I have tried renaming the contact (& have since backed up my phone) and done the usual turn it off and on again but none of this has worked.
    If you have any advice please let me know, thank you

    The answer is no, but not because of anything to do with the webOS. This feature uses a brand-new Bluetooth profile called MAP (Messaging Access Profile) and many devices have not implemented support for it yet. I took a quick look on the Apple support pages and found this article that lists the supported Bluetooth profiles. As you can see, MAP is not listed which means syncing SMS messages will not work on your iPhone.

Maybe you are looking for

  • Can I use an iPhone from Verizon with a canceled contract on another Verizon line?

    My mother recently canceled her with Verizon Wireless because she wanted to be on our family share plan. My older brother decided that he wanted to get his own contract and left the line for her to take. She doesn't like the phone that he had and she

  • Can't open or save png files

    Hi, I'm very new to fireworks and since I installed it 4 weeks ago I can't save or open png files. An error message appears stating An internal error occurred. I've read through other posts and because fonts kept coming up It needed doing anyway, I r

  • 20" cinema Aluminium, totally and utterly dead

    PSU is working just fine. The screen will not turn over, unresponsive to touch controls and no LED status light on this. Im thinking display board, unless anyone can help out with a suggestion? Also, does anyone know if the 23" ACD display board is c

  • VMware workstation下goldengate monitor server的配置

    java版本: java version "1.6.0_31" Java(TM) SE Runtime Environment (build 1.6.0_31-b05) Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing) ogg版本: Oracle GoldenGate Command Interpreter for Oracle Version 11.1.1.1 12733251 Windows (optimized

  • Is there programmatic control over Java control panels

    We have users who may not be able to (or we may not want them to) change their JRE settings. Anyone know if there is a way to deselect the browser JRE option in each version of the Java control panel? We'd like to do it programmatically.