Completed the scheduled task has not dropped

This has been already posted in the forum Planner, but I guess that more people of this forum watch. Sorry for the double post.


I create two jobs where the 2nd is waiting for the first to finish. The code example is from this thread: Re: consumption of scheduler events
begin
  dbms_scheduler.create_job (
    job_name => 'j1',job_type => 'plsql_block',
    job_action =>  'insert into test_event values(systimestamp, ''first job runs'');commit;',
    enabled => false,
    auto_drop => true);
  dbms_scheduler.set_attribute('j1', 'raise_events', DBMS_SCHEDULER.JOB_SUCCEEDED);
end;
 
begin
  dbms_scheduler.create_job('j2',
    job_type=>'plsql_block',
    job_action=>'insert into test_event values(systimestamp, ''second job runs'');commit;',
    event_condition => 'tab.user_data.object_name = ''J1''',
    queue_spec =>'sys.scheduler$_event_queue,job$_agent',
    enabled=>true,
    auto_drop => true);
end;
 
begin
  -- Enable the first job so that it starts running
  dbms_scheduler.enable('j1');
end;
It works (j1 and j2 performed in sequence), but the 2nd work (j2) is not deleted from user_scheduler_jobs after completion. The State remains STEADY.
It is a problem because I want to execute the code several times. This translates into:

ORA-27477: "J2" already exists
ORA-06512: at "SYS." DBMS_ISCHED", line 99
ORA-06512: at "SYS." DBMS_SCHEDULER", line 295
ORA-06512: at line 2

I can, of course, drop job j2 before creating this new, but I wonder why j2 is not automatically removed.

Version is Oracle Database 10g Express Edition Release 10.2.0.1.0

Hello

Still not sure exactly what is happening, but I think you can safely get around it by adding a max_runs attribute = 1 to J2.

for example

begin
  dbms_scheduler.create_job (
    job_name => 'j1',
    job_type => 'plsql_block',
    job_action =>  'insert into test_event values(systimestamp, ''first job runs'');commit;',
    enabled => false,
    auto_drop => true);
  dbms_scheduler.set_attribute('j1', 'raise_events', DBMS_SCHEDULER.JOB_SUCCEEDED);
end;
/

begin
  dbms_scheduler.create_job(
    job_name=>'j2',
    job_type=>'plsql_block',
    job_action=>'insert into test_event values(systimestamp, ''second job runs'');commit;',
    event_condition => 'tab.user_data.object_name = ''J1''',
    queue_spec =>'sys.scheduler$_event_queue,my_agent',
    enabled=>true,
    auto_drop => true);
  dbms_scheduler.set_attribute('j2', 'max_runs', 1);             "<-- added this line!!"
end;
/

begin
  -- Enable the first job so that it starts running
  dbms_scheduler.enable('j1');
end;
/

I hope this helps!

ADOS

Tags: Database

Similar Questions

  • Error during the download of Windows 8 on Windows 7: "download failed. The download task has not completed. The new attempt at repair by block limit has been exceeded. The file is corrupted. »

    Currently, I have Windows 7 and had to buy Windows 8 for the school. I tried downloading it several times, but when she writes the check, it is said, "Download unsuccessful. The download task has not completed. The new attempt at repair by block limit has been exceeded. The file is corrupted. »

    I don't know what to do.

    Original title: download Windows 8 Windows 7

    Hello Travis,

    Thanks for posting your question on the Forums of community of Microsoft.

    To better understand the issue please help us with these questions.

    from which site you try to download Windows 8?

    b. what browser do you use to download?

    c. you try to download a full version or update?

    d. you run the upgrade wizard before trying to download the Windows 8?

    This problem usually occurs due to the installation of Web the contents of the folder in the system. So, now, I you suggest to rename or delete the installation folder to the following location and then try to download Windows 8:

    C:\Users\\AppData\Local\Microsoft\Web install

    See also the link mentioned to follow the correct steps before and during the installation of Windows 8 below:
    How to upgrade to Windows 8

    Note: I strongly recommend to back up all your important files and folders on an external storage device before performing any type of upgrade of the OS.

    Hope this information is useful. If the problem still persists, please post back for further assistance, we will be happy to help you.

  • SQLcl throws the Exception on start and stop operating within the scheduled task

    I'm on Windows Server 2012 R2 runs a script TakeCommand (jpsoft.com) as a task scheduled using SQLcl - 4.2.0.15.177.0246.

    The script is invoked, when the account (with administrative privileges) who runs the scheduled task is not connected to the machine.

    The scenario is as follows:

    • servers both windows ServerA and ServerB (virtual servers)
    • ServerA has a SAN connected directly (as E drive)
    • ServerB remotely accesses drive E on ServerA and maps in drive E (guest ServerB cmd > net use e: \\ServerA\e)
    • the problem occurs on server b.

    Corr 04/09/2015: the SAN is not the cause of the errors/exceptions - it's just that the user who runs the scheduled task is not logged on and therefore has no APPDATA

    When SQLcl is called, the following lines are recorded... (italics: private information, "BOLD": SQLcl output not visible when the user connects while work is carried out at the request)

    03/09/2015 12:16:41.979 to connect to the jdbc URL ... (this output is to the batch calling SQLcl - everything below is SQLcl or SQL script)

    Sep 03, oracle.dbtools.raptor.console.MultiLineHistory load 2015 12:18:05

    SEVERE: HIST-013 APPDATA is null

    Sep 03, oracle.dbtools.raptor.newscriptrunner.commands.net.NetEntries load 2015 12:18:55

    SEVERE: NET-013 APPDATA is null

    Sep 03, 2015 12:18:55 oracle.dbtools.raptor.newscriptrunner.commands.net.NetEntries save

    SEVERE: NET-013 APPDATA is null

    03.09.2015 12:18:56: updated information on what will be done

    0 lines merged.

    0 lines merged.

    03.09.2015 12:19:15: updated information on what will be done

    0 lines merged.

    Exception in thread "cleansing" java.lang.NullPointerException

    in java.io.File. < init > (File.java:277)

    at oracle.dbtools.raptor.newscriptrunner.commands.alias.Aliases.save(Aliases.java:132)

    at oracle.dbtools.raptor.newscriptrunner.commands.alias.Aliases.save(Aliases.java:128)

    to oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli$ 1.run(SqlCli.java:356)

    In addition, that everything works fine... the script is executed as planned, as expected, the queued files are created...

    So what I am doing wrong?

    Best regards, Peter

    Message geändert durch stueckl - information server added

    Message geändert durch stueckl - information server deleted - it's a general problem

    If we were talking about developer SQL itself rather than SQLcl, then the solution is simple... you can always force your user settings to a folder accessible in arbitrary writing using the ide.user.dir environment variable just add something like this line to the file sqldeveloper.conf to your installation:

    AddVMOption - Dide.user.dir =

    SQLcl, however, is hard-coded dependency on APPDATA in Windows (and user.home on Linux).  May not be feasible in your case, but in some cases simple, APPDATA can be overridden in the script that launches the SQLcl and the NetEntries and xml SQL history files are read from / written to this file.

    For example: value APPDATA = C:\Temp

  • When you try to schedule a task in XP, make a mistake "the new task could not be created the specific error is 0x80070005: access is denied."

    My

    System Type X 86-based PC
    Processor x 86 Family 6 Model 23 Stepping 10 GenuineIntel ~ 3324 Mhz
    A05 BIOS Version/Date Dell Inc., 07-31-2009
    SMBIOS 2.5 version

    I'm trying to schedule a new task I get this error

    The new task could not be created specific error is 0x80070005: access is denied

    I am an administrator for this computer and I am connected to the office network.

    I downloaded a patch KB904423, but it tells me that the installer has detected that the SP of the system version is newer the updte I am applying, I did not need to install this update

    Is there any fix for this?

    Thank you

    Hi dgxp64,

    ·         The computer is on a domain network?

    Method 1: Temporarily disable the antivirus on the computer program and check if it helps. If it works, you may need to check the settings of the program.

    Note: Check that you activate your anti-virus protection on the computer back after you complete these steps. It is not recommended to disable these settings on the computer. It's just to solve the problem.

    Method 2: Check to see if this article helps you.

    How to solve the scheduled tasks in Windows XP and Windows Server 2003

    Method 3: We will grant permission for the C:\Users folder and check if it helps.

    How to set, view, change, or remove special permissions for files and folders in Windows XP

    If the computer is on a domain network you can post your query on the TechNet Forums.

    Windows XP IT Pro category

  • Unable to create restore point. Vista64. Could not create the scheduled task for the following reason: cannot create a file when that file already exists

    RAID 5 obtained corrupte had to rebuild after that can't create system restore point. Tried everything sfc, fsutil, Dungeon SystemPropertiesProtection screen displaying this error: "could not create the scheduled task for the following reason: cannot create a file when that file already exists." (0x800700B7)"system of work in all other respects. SFC says it found and fixed errors every time I run it.

    Fix tried Della Li: Please remove the WindowsBackup folder in the HKEY_LOCAL_MACHINE NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows.

    Delete the WINDOWS BACKUP folder. Unfortunately this folder does not exist.

    Checked VSS, Taskscheduler and other services are runnig

    Tried to boot from the CD and widowed revover. Says no problems. The error to any manulation of the checkbox in the properties of the system, the system protection screen

    Solved

    It turns out that task scheduler got corrupted it have several tasks Scheduler said were not available, but are still in the working directory. These tasks especially SR from compensation directory solved the problem and I can now create backup points.

  • Computer not stay awake for the scheduled task

    System wakes up to the task at the right time, but falls asleep almost immediately after starting the task.  Power management is set to put the computer to sleep after 20 minutes, but eventlog shows the alarm system at 01:59 for the scheduled task and to sleep at 02:02.

    Am running Vista Home Basic SP2

    Excellent.  I am pleased to learn that the problem is essentially solved with only a little extra configuration of the task remaining.

    I am happy that I was able to help.  It was my pleasure.

    Thanks for the comments, and we do know that it worked.  This can help other people with the same problem.

    Good luck and best wishes!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • manages scheduled tasks has stopped working and was closed

    Lately I get this error message often when I start using my Vista PC (Vista Business SP2) in the morning: "manages scheduled tasks has stopped working and was closed".

    And this morning the automatic update of Windows Defender definitions also could not install (so I would be dnld and installed).  Set to automatic update referred to 'unknown error' (8 and 57, I think).

    FYI, sfc/scannow reported no integrity violoations with system files.  I also reconfigured my PC there is to make sure that it is clean, fresh and perfectly up-to-date before reinstalling all my apps, and it's been updated for about 2 months then.

    How this application problem "manages scheduled tasks" can be fixed?  If you don't know, where can I get an answer?  Neither Google nor Bing seem to show any reference to the exact phrase "" manages scheduled tasks has stopped working stopped working '. "

    Craig in New Jersey

    Update 7/22: I'm starting to suspect a problem of interactions between turn off Vista and [printer] HP Digital Imaging Monitor.  I tried to disable it via msconfig, a couple of days and have not seen the mistakes regularly ever since, but the jury is still pending for another week or two.   I'll report after awhile.

    It is too early to point a finger because we know that all of them have well worked normally in the past and they seem equally at risk of corruption.  For example, I have no these errors when you use the same software HP on my Win7 PC and I don't have these errors for a few months after that the reconstruction of my Vista laptop, so I'm suspecting some piece of software has become corrupted (something in Vista), or something the tracking software program, some windows or component or registry setting software execution to one who relies on the HP printer.

    Craig in New Jersey

    Update 7/27 edit: Since disabling component HP Digital Imaging Monitor (hpqtra08.exe) drivers HP printer/scanner more than a week ago, I have not seen error messages 'has stopped working and was closed"breed, and Windows Update seems to operate normally.

  • Scheduled task does not play if already open WMP, trying to avoid manual close

    I'm in a work centre that will make announcements every day on a speaker system that is run by windows media player. I set up a scheduled task to all files that will play, but once the said file is played WMP does not close automatically. This does not seem like a problem, but if nobody closes on WMP, the next scheduled task will not - play which completely defeated the purpose to automate the process and our workers will have to still remember to close WMP 3 or 4 times a day, otherwise nobody gets the announcement.

    I have tried implementing a command line with /play wmplayer start/close c:myfile.wav as an executable file and run it with the Task Scheduler instead of the wav file... it did not work. Namely, the /close function was abandoned with WMP.

    Is it possible that I can continue to use WMP and completely automate this process without the manual close WMP after each scheduled task?

    Hi Rodvold,

    The issue of Windows XP, you have posted is related to Windows XP in a domain environment. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet forums.

    To change the scheduled tasks in Windows XP, you can also check this link:

    How to modify the scheduled tasks in Windows XP

    Hope the helps of information.

    Concerning
    Joel S
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • ODI-1226: Error_log_procedure step fails after 1 attempt. ODI-1232: the execution of the procedure error_log_procedure failed. ODI-1246: the logical schema has not been defined for error_log_procedure.

    I created a procedure running during the mapping fails but I am facing this error

    ODI-1226: Error_log_procedure step fails after 1 attempt.

    ODI-1232: the execution of the procedure error_log_procedure failed.

    ODI-1246: the logical schema has not been defined for error_log_procedure.

    at oracle.odi.runtime.agent.execution.AbstractSessionTask.getCollectDwgConnectConnection(AbstractSessionTask.java:754)

    at oracle.odi.runtime.agent.execution.AbstractSessionTask.getCollectDwgConnectConnection(AbstractSessionTask.java:730)

    at oracle.odi.runtime.agent.execution.SessionTask.getExecutor(SessionTask.java:239)

    at oracle.odi.runtime.agent.execution.SessionTask.processTask(SessionTask.java:152)

    at oracle.odi.runtime.agent.execution.SessionTask.doExecuteTask(SessionTask.java:111)

    at oracle.odi.runtime.agent.execution.AbstractSessionTask.execute(AbstractSessionTask.java:864)

    to oracle.odi.runtime.agent.execution.SessionExecutor$ SerialTrain.runTasks (SessionExecutor.java:2024)

    at oracle.odi.runtime.agent.execution.SessionExecutor.executeSession(SessionExecutor.java:562)

    to oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$ 1.doAction(TaskExecutorAgentRequestProcessor.java:718)

    to oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$ 1.doAction(TaskExecutorAgentRequestProcessor.java:611)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:203)

    at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.doProcessStartAgentTask(TaskExecutorAgentRequestProcessor.java:800)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 1400 (StartSessRequestProcessor.java:74)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:702)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:180)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:108)

    to java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:471)

    at oracle.odi.runtime.agent.execution.job.OdiJob.call(OdiJob.java:73)

    at oracle.odi.runtime.agent.execution.job.OdiJob.call(OdiJob.java:73)

    at java.util.concurrent.FutureTask.run(FutureTask.java:262)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:615)

    at java.lang.Thread.run(Thread.java:724)

    Navigate to the ODI object with the name error_log_procedure , which I assume is an ODI procedure. On the target tab (and if this source) make sure that you have specified a logical schema in the appropriate drop-down box

  • I was wondering in the era of 3d everything that the operating system has not changed to 3d?

    I was wondering in the era of 3d everything that the operating system has not changed to 3d. like where the BONE is part of work like as if you where he is plunged into a game but the game was the operating system. As windows responding simcity.  so when you interact with something he grows or changes the subject. I'm tired of seeing a 2d world when I know that a 3d world is here. I want to say is that imagine an OS that was alive. like all those science fiction movies. I'm new to programming, but it's just one of my many ideas that I think could change the computer OS never imagine sitting on your couch with 3d glasses and feel like you where in a virtual world.

    One simple reason: convenience.

    The current problem with our 3D technology is that it would be broken by you are going to use the touch interface. Because, after all, it's just an illusion. Now let's talk about resources: do you really want your OS using towards the top of your ram, CPU and GPU to the point where you could not yet to start a game?

    Now think about 5 years computers upgraded... they would be even able to run this OS?

    What happens if there is more than one user per computer? What about people who get migraines of 3D? (shutter put on my glasses and my ability to perform simple tasks similarly is gone in 5 min with migraine resulting)

    Maybe this will be handy one day, we just aren't there yet. Do not give up the hope, however: at the moment where you get one such product coded, the tech world will already be a different place.

  • Windows XP Pro - failure of the scheduled task?

    Why my regular job failure?

    Is there an example page on things to do and not do?

    I have a backup program will not work correctly.

    TY,

    Bill

    Hi Bill,

    1. what exactly happens when you run the backup program?

    If a scheduled task does not run when you expect it, right-click the task, and then click Properties. On the Task tab, make sure that the enabled check box is selected. On the tab schedule, check that planning is set correctly.

    See scheduled tasks troubleshooting
    See also How do I solve the scheduled tasks in Windows XP

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Make a backup of ASR, saved, but at the end of the record, I got this message: discovery of the ASR diskette has not been created.

    at the end of the recording, I got this message: discovery of the ASR diskette has not been created. You will not be able to restore an ASR backup without the system information stored on this disk. What does that mean? Should I save my data otherwise? I don't have a floppy drive (I'm surprised if someone does) but I have a dvd read/write cd drive... One last thing. When I looked at the content on the flash drive with program de-Frag it was lit, which means completely fragmented, the program recommended it de-fragment it... is this safe with a file of this size on a flash drive?

    Original title: Saving went well, but

    Windows XP is too old to do something other than a floppy drive.  If the automated system recovery disk is important to your backup and restore needs (HINT: YES it IS!) then get a USB floppy drive to create the ASR disk.  Or get a copy of most modern backup and restore program that works under XP and use modern media (USB, CD/DVD, keys etc.) to create a startup/recovery media.

  • The Event Viewer error on startup: "the scheduled task of CARPET met a failure during configuration data collection. HR = 0xC004F00E.

    I use Windows XP with AMD processor clocked at 1.6 Ghz and 2 GB of RAM. This error appears in the event viewer whenever my computer starts. I don't know if it's doing any harm. can someone advise?

    original title: the scheduled task of CARPET met a failure during configuration data collection. HR = 0xC004F00E

    Hello Steven,

    Did you ever receive notifications that a virus or malware has been removed from your system recently?
    My only thought is that it is the remains of an infection on your machine.
    It is most likely harmless, but I don't understand why you'd be concerned.
    Do you have any task scheduled to run at startup using Task Scheduler built into Windows?
    I would check to see if there are tasks to run at startup:
  • Change the time for the scheduled task, I added

    I created a schedular system file (.vbs) that supports the backup of the database of one of my application. I added this file to the scheduled task. I put the time of execution to 15:00 daily, now I want to update at the time of execution of the task sacheduled. How can I do? I use Windiws 7 Home premium.

    Hi Aurélie Rozier,.

    Click on the Start button and type "Calendar" in the search box. The option tasks planning must appear in the search list. Click (or double-click) on this option to launch scheduled tasks. When the window tasks planned opens leaves the Task Scheduler list fill out and then look to the bottom of this list for planning thye name, that you want to change. When you have found, right-click on it and choose Properties. In the Properties window, click the triggers tab and then click Edit at the bottom of the special editing window. You should be able to change the time from there.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Desktop Experience: Web:http://www.winuser.co.uk;  Web: http://xphelpandsupport.mvps.org;  Web: http://vistasupport.mvps.org;  Web: http://www.silversurfer-guide.com

  • Scheduled tasks does not

    Hi all

    I have a page that executes the code and generates email. I can run this page very well in the browser, but when I schedule it, nothing happens. If I manually run the task in the Scheduler, the task said that he ran.

    I have included a user account and the pw in the scheduled task that has access to the page.

    I am at a loss here...

    ??

    Nothing is currently limited by security.

    Thank you

    John

    I understood what my problem was... was to generate the results to a file C:\... and then I saw an error... due isDefine a variable.

Maybe you are looking for