Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8300191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:27:13+00:00 2026-06-08T16:27:13+00:00

I would like to launch a scheduled job after every two hours starting from

  • 0

I would like to launch a scheduled job after every two hours starting from 04:15 tomorrow. The job should launch everyday and after every two hours. Something like at : 04:15, 06:15, 08:15….

The procedure is about creating file in a remote machine. When I test the procedure then it works just fine, and creates file in remote location. However, it fails as a job in dbms_jobs package. I am not sure what I am doing wrong. Here is the code of procedure:

CREATE OR REPLACE PROCEDURE ARC_HRVR.VR_AD_INTEGRATION_EXPORT AS
    v_file UTL_FILE.file_type;
BEGIN
    v_file := UTL_FILE.fopen('DIR_VR_AD_INTEGRATION', 'HRMtoAD1_'||to_char(sysdate,'YYYYMMDD')||'_'||to_char(sysdate,'HH24MISS'), 'w', 32767);
    FOR x IN (
    SELECT * FROM (SELECT
                   decode(pid, NULL, RPAD(' ',7,' '), RPAD(user_id, 7, ' '))|| '' ||
                   decode(o365, NULL, RPAD(' ',80,' '), RPAD(o365, 80, ' '))
                   str FROM table WHERE integrated = 'N') str WHERE rownum <= 1000 ORDER BY rownum)
   ´LOOP
    BEGIN
        UTL_FILE.put_line(v_file, x.str);
    END;
END LOOP;
UTL_FILE.fflush(v_file);
UTL_FILE.fclose(v_file);
END VR_AD_INTEGRATION_EXPORT;

And here is the code for launching job:

  DECLARE
   l_id binary_integer;
   begin
   dbms_job.submit(job => l_id, what => 'ARC_HRVR.vr_ad_integration_export();', interval => 'TRUNC(SYSDATE)+1+4.25/24', );

   dbms_output.put_line(l_id);    
end; 

A bit of guidance and tweaking will fix my code 🙂
Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T16:27:16+00:00Added an answer on June 8, 2026 at 4:27 pm

    Are you putting in the job as the procedure owner (ARC_HRVR) or as a user that has access to execute the code?

    Have you tried surrounding the ‘what’ in a execution block?

    begin ARC_HRVR.vr_ad_integration_export(); end;
    

    The job is launching, right? You see next_date getting updated in the view dba_jobs, etc?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to launch fancybox from another function. I need this trigger after
I would like to launch a Scala Swing application from the command line, then
I have a Cocoa application (.app) and I would like to launch it from
I would like to launch the market from a preference screen but when I
I would like to launch an app the user selects from within my application.
I have an email template that I would like to launch from within the
I have a .pdf help file and would like to launch it from my
I would like to launch a URL from the iOS Settings Bundle that would
I would like to be able launch a 2nd Preference screen from my PreferenceActivity.
I would like a batch file to launch two separate programs then have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.