Scheduler Multiple Runs..
Oracle Version: 11.1.0.7 x64
OS: Windows 2008 Server x64
Hi There,
We have an oracle job scheduled through the oracle scheduler, and we were wondering if it's possible to have multiple run times for this particular job. The current job runs daily at 4am, and we were wondering if we can have it running at 4am,11pm, and 4pm too?
Is there a way to add multiple schedules to an oracle job? Or do we have to create different jobs, 1 per run?
Thanks and Regards
rsar001 wrote:
Oracle Version: 11.1.0.7 x64
OS: Windows 2008 Server x64
Hi There,
We have an oracle job scheduled through the oracle scheduler, and we were wondering if it's possible to have multiple run times for this particular job. The current job runs daily at 4am, and we were wondering if we can have it running at 4am,11pm, and 4pm too?
Is there a way to add multiple schedules to an oracle job? Or do we have to create different jobs, 1 per run?
Thanks and RegardsI'd do 3 separate jobs
Similar Messages
-
Schedule multiple jobs/test runs
Hi,
Is there a way to schedule multiple jobs/test runs with oats 9.10?
It seems it is only possible to schedule a single job, by setting the start time in OLT...
Any suggestions?Hi
I'm talking about functional tests.
In OLT when you set the auto-pilot you can schedule the test to start after a delay of xxx minutes or at some exact time, however I have never used that fixture.
Regards
Alex -
[Forum FAQ] Schedule multiple versions of System Image Backup in Windows 8.1
As we known that there is no UI for user to configure Image backup in Windows 8.1, this is a guide for your to schedule multiple versions of System Image Backup.
Step 1: Create a task to schedule an image backup with following command:
SCHTASKS /Create /SC WEEKLY /D MON /TN WeeklyFullBackup /RL HIGHEST /ST 13:00 /TR “wbAdmin Start Backup -backupTarget:F: -include:C: -allCritical -quiet”
Step 2: Schedule a robocopy to backup the saved image with BAT file:
Please create a new folder (in this example, the new folder is e:\test2) to save your multiple copies of image backup:
Write following batch file to copy backup and rename with backup date:
*****************BAT********************
@echo off
robocopy e:\test1\ e:\test2\ test.wim
ren e:\test2\test.wim test_%date:~10,4%%date:~7,2%%date:~4,2%_%time:~0,2%%time:~3,2%.wim
NOTE: e:\test2 is my location to save multiple copies of image backup; e:\test1 is the location I create the system image backup.
This BAT can also help to rename the copy of image backup with date and time like below:
3. Set up a basic task in Task schedule:
Note: please make sure the time you configured follows the time you set for image backup in Step 1.
Action -> Create basic task (Name you task) -> Trigger (Set how often this task should be run) -> Action (Start a program) -> Under Program/script, point to your bat file you create in Step 2.b -> Finish
At the end, you can know more about SCHTASKS and Robocopy via following links:
Robocopy
http://technet.microsoft.com/en-us/library/cc733145.aspx
Schtasks
http://technet.microsoft.com/en-us/library/cc725744.aspx
Welcome to your feedbacks.
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Hi,
Thanks for posting in Microsoft TechNet forums.
I will try to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Regards,
Kelvin Xu
TechNet Community Support -
Hi
Logically, we should be able to schedule multiple BDLS jobs for different selection of tables. But when I schedule second job, it either runs into error or completes without considering the table selection.
Is there any procedure for scheduling multiple BDLS jobs or the parallel BDLS execution functionality does not exist ?
Thanks & Regards
MadhuNo Roel,
I think I took the wrong term. We have several logical system landscapes in 1 maintenance cycle.
For instance:
Maintenance cycle 1 contains:
landscape R3
DEV
QAS
PRD
landscpae BW
BD0
BA0
BP0
landscape SRM
ED0
EA0
EP0
If I want to schedule an import job to import all transports of maintenance cycle 1 in all systems, I have in the above example to schedule 3 jobs. (1 in PRD, 1 in BP0 and 1 in EP0)
The question is whether I can do this by 1 action. Schedule the import of all PRD systems on the maintenance level in stead of the landscape levels separately.
kind regards,
David -
Hi,
A backup job has been setup on Windows Server 2012 (Platform: Win32NT; ServicePack: ; Version: 6.2.9200.0; VersionString : Microsoft Windows NT 6.2.9200.0) via Windows Backup Software UI (Local Backup 1.0).
It is appearing as a scheduled task "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup" belonging to user 'nt authority\system' in task scheduler.
The problem is that the Backup job never start despite the scheduled task running and completing successfully (when run automatically or manually)!
Would you be able to explain why and assist in resolving that issue?
Here is what we know:
When the backup is run manually via the Windows Backup Software UI, it works fine.
When the backup is run via command line (as set in schedule task) in a cmd command prompt (as local/domain 'administrator' or as 'nt authority\system' which is possible by running command prompt via 'PsExec.exe -i -s cmd'), something like "%windir%\System32\wbadmin.exe
start backup -templateId:{f11eb3aa-74e7-4ff4-a57b-d8d567ee3f77} -quiet", it works fine.
If you manually run the preset scheduled task while logged in as administrator, the task run and complete successfully but the backup job does not start.
Idem if you schedule task is run automatically at scheduled time.
The schedule task run and complete successfully but the backup job does not start.
It is confirmed by running the following in a command prompt as 'nt authority\system':
schtasks /run /tn "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup"
SUCCESS: Attempted to run the scheduled task "\Microsoft\Windows\Backup\Microsoft-Windows-WindowsBackup".
Despite success result, the Backup job does not start running...
No errors or warning appears anywhere in Event Logs (Microsoft > Windows > Backup or Task Scheduler) nor in the scheduled task History tab. The schedule task complete successfully but no Backup job is run...
If scheduled task automatically set by Windows Backup software is duplicated (copied) and set manually it runs fine as 'administrator' and as 'nt authority\system' (subject that 'nt authority\system' is added to the 'Backup Operators' AD group).
Here is an export of the current pre-set schedule task, is there any settings that need to be changed to make it works?
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>MYDOMAIN\SERVER1</Author>
<SecurityDescriptor>D:AR(A;OICI;GA;;;BA)(A;OICI;GR;;;BO)</SecurityDescriptor>
</RegistrationInfo>
<Triggers>
<CalendarTrigger id="Trigger 1">
<StartBoundary>2014-07-14T21:00:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-18</UserId>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>Parallel</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>true</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>P3D</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>%windir%\System32\wbadmin.exe</Command>
<Arguments>start backup -templateId:{f11eb3aa-74e7-4ff4-a57b-d8d567ee3f77} -quiet</Arguments>
</Exec>
</Actions>
</Task>
Thank you in advance for your feedback.Once again, the issue is not to run the backup manually from the command line but to have it run via the scheduled task setup by the Windows Backup software.
By default, the schedule task is to be run as NT Authority\System, and when run under this account, the backup does not start (even though account is member of Backup Operators) and job can manually be run via elevated command prompt. This is not a normal
behavior and constitute a major bug in Windows Server 2012.
From my understanding the NT Authority\System account is a built-in account from Windows that should by default be part of the Administrators group (built-in) even though it does not explicitly appears like it in AD by default.
This account shall have by default Administrators rights and Backup Operators rights (via the Administrators group) without being explicitly added to those groups (http://msdn.microsoft.com/en-gb/library/windows/desktop/ms684190%28v=vs.85%29.aspx). By design
it is supposed to be the most powerful account which has unrestricted access to all local system resources. If that is not the case (as it seems) then this would constitute a major bug in Windows Server 2012 edition.
As said previously and as you confirmed, currently by default NT Authority\System on Windows 2012 server cannot start backup manually via an elevated command prompt unless it is manually added to Backup Operators (or Administrators) group. But wouldn't that
constitute a bug of Windows Server 2012?
Our server has not yet been restarted since I added NT Authority\System account to the Administrators group explicitly manually so I cannot yet confirmed it would sort the issue. Indeed it is heavily in use so cannot easily be restarted. Will confirm when
done.
We also have an additional problem where after a while of last reboot, part of the Exchange ECP can no longer be properly loaded in the web browser due to compilation error (compilation is done via NT Authority\System account which seems to no longer have
sufficient right to compile .NET code). What is strange is that it works at first and then stop working at some point... I am hopeful that adding NT Authority\System to the Administrators group would sort this issue as well but once again, that shall not be
needed!!!
Could a Windows Server 2012 update introduced some security policy changes or else that prevent NT Authority\System to have full power? -
Questions on Scheduling and Running an Agent and Scenario
Hi,
I have created a scenario and I want to schedule it to run. Is it possible to schedule and run it using an agent but having no Repository?
Thanks,
RandyHi Rathish and GuruSank,
Thanks for replying. I inserted a schedule in my scenario. After that I go to Topology Manager -> Physical Architecture and Update the scheduling of my agent
but the below error shows up;
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at com.sunopsis.dwg.dbobj.SnpSession.remoteExecuteTest(SnpSession.java)
at com.sunopsis.graphical.r.bz.actionPerformed(bz.java)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Please help me again.
Thanks,
Randy -
How to create a schedule to run once?
I am having some problems getting a schedule to run only once. If I leave the repeat_interval empty, the schedule does not run at all. The documentation explains all the options for setting the repeat frequency, but it does not explain how to run it only once at a set time/date. I have created a user interface to allow the users to create their own schedules and I'd rather not do something like a "yearly" interval with an end date of next week. I need the generic solution.
Any ideas?Hi Ravi,
Thanks for your reply!
I have just discovered something very interesting! best explained by example:
(I might log an SR through metalink too. I'll be sure to update this thread with the outcome...)
I create 3 schedules and 3 simple jobs:
schedule 1 - start_date in 2 minutes time (eg. 11:30:00), repeat_interval => null
schedule 2 - start_date in 2 minutes, 20 seconds time (eg. 11:30:20), repeat_interval => 'FREQ=DAILY'
schedule 3 - start_date in 2 minutes, 40 seconds time (eg. 11:30:40), repeat_interval => null
jobs 1, 2 and 3 just insert a row into a table through a PL/SQL block.
My test results are as follows:
1. The first time these schedules are created only schedule 2 runs. Schedules 1 and 3 never run.
2. I drop and re-create all schedules and jobs, (adjusting the time to a few minutes in the future) and re-submit the schedules and jobs and they all run. I can continue this as many times as I like now and the repeat_interval of null will now work fine.
3. re-start the 10gR2 database.
4. re-create the schedules and jobs and only schedule 2 runs again. Schedules 1 and 3 never run. (I'm back at step 1!! I can reproduce this problem anytime by following these steps)
My script is below:
declare
start_datetime__w timestamp(3) with time zone;
repeat_interval__w varchar2(200);
begin
* REPEAT INTERVAL NULL TEST
* TIM_SCHED_2_1 - no repeat interval
* TIM_SCHED_2_2 - a repeat interval
* TIM_SCHED_2_3 - no repeat interval (identical to TIM_SCHED_2_1)
* Results on my 10gR2 database (Redhat Enterprise Linux 4.4) are:
* job 2 will always run
* jobs 1 and 3 will only run after the successful run of job2 AND jobs 1 and 3 have been re-created
* Why?
* It seems the scheduler needs a wakeup call!!!
* test table: create table tim (col1 varchar2(30), col2 date);
-- Cleanup previous jobs:
--dbms_scheduler.drop_job (job_name => 'TIM_JOB_2_1');
--dbms_scheduler.drop_schedule (schedule_name => 'TIM_SCHED_2_1');
--dbms_scheduler.drop_job (job_name => 'TIM_JOB_2_2');
--dbms_scheduler.drop_schedule (schedule_name => 'TIM_SCHED_2_2');
--dbms_scheduler.drop_job (job_name => 'TIM_JOB_2_3');
--dbms_scheduler.drop_schedule (schedule_name => 'TIM_SCHED_2_3');
repeat_interval__w := 'FREQ=DAILY';
-- create schedule TIM_SCHED_2_1, repeat_interval__w = null
start_datetime__w := '27-FEB-2007 11:34:00.000 AM +10:00';
dbms_scheduler.create_schedule (schedule_name => 'TIM_SCHED_2_1',
start_date => start_datetime__w,
repeat_interval => null,
end_date => null,
comments => 'schedule created at '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
-- create schedule TIM_SCHED_2_2, with a repeat_interval set
start_datetime__w := '27-FEB-2007 11:34:20.000 AM +10:00';
dbms_scheduler.create_schedule (schedule_name => 'TIM_SCHED_2_2',
start_date => start_datetime__w,
repeat_interval => repeat_interval__w,
end_date => null,
comments => 'schedule created at '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
-- create schedule TIM_SCHED_2_3, repeat_interval__w = null (SCHEDULE IDENTICAL TO TIM_SCHED_2_1)
start_datetime__w := '27-FEB-2007 11:34:40.000 AM +10:00';
dbms_scheduler.create_schedule (schedule_name => 'TIM_SCHED_2_3',
start_date => start_datetime__w,
repeat_interval => null,
end_date => null,
comments => 'schedule created at '||to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'));
-- create jobs
dbms_scheduler.create_job (job_name => 'TIM_JOB_2_1',
schedule_name => 'TIM_SCHED_2_1',
job_type => 'PLSQL_BLOCK',
job_action => 'begin '||
'insert into tim values (''TIM_JOB_2_1'', sysdate); '||
'commit; '||
'end;',
number_of_arguments => 0,
enabled => TRUE,
comments => 'job created at '||to_char(sysdate,'DD-MON-YY HH24:MI:SS'));
dbms_scheduler.create_job (job_name => 'TIM_JOB_2_2',
schedule_name => 'TIM_SCHED_2_2',
job_type => 'PLSQL_BLOCK',
job_action => 'begin '||
'insert into tim values (''TIM_JOB_2_2'', sysdate); '||
'commit; '||
'end;',
number_of_arguments => 0,
enabled => TRUE,
comments => 'job created at '||to_char(sysdate,'DD-MON-YY HH24:MI:SS'));
dbms_scheduler.create_job (job_name => 'TIM_JOB_2_3',
schedule_name => 'TIM_SCHED_2_3',
job_type => 'PLSQL_BLOCK',
job_action => 'begin '||
'insert into tim values (''TIM_JOB_2_3'', sysdate); '||
'commit; '||
'end;',
number_of_arguments => 0,
enabled => TRUE,
comments => 'job created at '||to_char(sysdate,'DD-MON-YY HH24:MI:SS'));
end;
Cheers,
Tim. -
Multiple runs on a single graph
Hi,
Just a quick question. I am using a Voltage Source meter that spits out an 2 arrays of data after it has done its measurement. I then plot the arrays with respect to each other using an Express XY graph. I have put the code in a for loop so that it does multiple measurements or multiple runs. So if a single run gives me a plot that looks like a straight line, 5 runs would give me 5 straight lines. My problem is that the graph, connects the last value of the previous run to the first value of the next run. I want it to plot each run independently but overlapping them in the same graph so that I can look for deviations. The XY graph is inside the for loop, so I would imagine, that when the instrument spits our the next set of data, it would be plotted in the same graph independently.
Any Suggestions?
Solved!
Go to Solution.Ah, I never saw the number 10 anywhere.
You don't need to process the NaN with mathscript. It is sufficient to add the NaN to the data going to the graph terminal. Even if mathscript gets an NaN, you can probably test how it is handled.
What does the mathscript node actually do? If it is just doing some scaling, it probably will not matter, but if it would do e.g. a linear regression, it would probably give unexpected results.
LabVIEW Champion . Do more with less code and in less time . -
SCHEDULED REPORT RUNS FINE BUT UNABLE TO PULL UP THE RESULTS
Hello all,
I can create a new report in against Discoverer with no problem. The report can be run as a scheduled report....and the
results pulled up with no problem.
EXISTING reports that were converted during our 9i to 10G can be scheduled and run. However, when the user attempts to see
the results they receive an error message stating:
The results run for this scheduled workbook can no longer be used because the query has been changed.
Do you want to query the database for the new results?
After installing a patch some of the workbooks were able to be retrieved. It seems like there is some commonality in the workbooks that don't seem to work from the scheduled reports. It seems that any workbook that has an admin created calculation in the EUL as one of the selected fields or as a condition of the report, causes a problem.
If anyone of you came across this situation please guide us.
Thanks
ManoharHi Manohar
By resaving I mean opening the workbook in Plus then clicking the Save button to force Discoverer to save a clean copy. You should then reschedule this and see what happens.
Here's another trick from way back in the early days of Discoverer that might help. You said that the issue was with an admin created calculation. So, try this:
Create a brand new calculation in your workbook and load the admin calculation into it. Then change all references for the admin calculation, conditions etc, to point at the new calculation.
Believe it or not, this trick can sometime force Discoverer to work when it otherwise will not. At any rate, its worth a try don't you think?
Best wishes
Michael -
Landed Cost manager Program is scheduled to run everyday but it did not run
Hi All,
Landed Cost manager Program is scheduled to run everyday but it did not run for 2 days and there was no error; it did not start even though it is a scheduled prog to run every 30 mins.
Please let me know if anyone has experienced similar cases before; also let me know if you have any clue for above? I am also researching on if there is any way to send notifications when a scheduled prog did not run even.
Any suggestions are welcome and also would like to get your thoughts on notification part if this is possible to track.
Thanks
De1006390 wrote:
Hi All,
Landed Cost manager Program is scheduled to run everyday but it did not run for 2 days and there was no error; it did not start even though it is a scheduled prog to run every 30 mins.
Please let me know if anyone has experienced similar cases before; also let me know if you have any clue for above? I am also researching on if there is any way to send notifications when a scheduled prog did not run even.What if you submit the request manually, does it work?
Assuming no error can be found in the DB/CM log files, have you verified the scheduled settings for this program? Try to schedule it again and see if this helps.
Any suggestions are welcome and also would like to get your thoughts on notification part if this is possible to track.
http://docs.oracle.com/cd/E18727_01/doc.121/e12951/toc.htm
https://forums.oracle.com/forums/search.jspa?threadID=&q=Notify+AND+Concurrent&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001 -
How to Set arguments to PL-SQL Procedure schedule to run from OEM.
Hi All,
OEM Config Details is as follows
Oracle (R) Enterprise Manager Ver 9.2.0.1.0
I created a job which is scheduled to run a PL-SQL Procedure. The procedure should accept two arguments as follows.
BEGIN
FLSTG.PROC_DELETE_DATA (ARG1,ARG2);
END;
Arg1 is of type Varchar2 & Arg2 is of type Date
How should i set arguments for the procedure?
Can someone please help me?
Thanks in Advance.
Regards,
VidyanandThe only problem is when writing an ODI procedure using the Oracle Technology in ODI Designer, ODI asks for the Schema.
If I do not assign a value to the schema field when I run my ODI procedure I get the error message :
java.lang.Exception: Internal error: object ConnectConnection
ColConnectId:null
ColContextCode:CTX_SRC
ColConName:null
ColIndCommit:null
ColIsolLevel:null
ColLschemaName:null
ColPlanComp:null
ColTechIntName:null
DefConnectId:null
DefContextCode:CTX_SRC
DefConName:null
DefIndCommit:null
DefIsolLevel:null
DefLschemaName:null
DefPlanComp:null
DefTechIntName:ORACLE
ExeChannel:J
IndErr:0
IndLogMethod:null
IndLogNb:null
LogLevDet:3
Nno:1
OrdTrt:0
ScenTaskNo:1
SessNo:4152001
TaskName1:Traitement
TaskName2:CNT_SRC_ALL
TaskName3:DROP COUNT_ROWS -
Scheduling multiple tasks dynamically
Hi !
I'm working on schedulers.
My problem is I have a list of dynamically generated reports.For every report that is generated , a corresponding scheduler must run periodically say , every day at certain time. The time at which the scheduler must run will be inputted by the user for each report.
I was able to run the scheduler perfectly if there was just one report. But whenever I have more than 1 report , I'm unable to handle.
Please suggest any idea or solution for this.
My scheduler will start when my application server is started.
I'm using a class that extends TimerTask class.
Thanks in advance,
ChandrikaHi !
A'rite here is the code ....
I'm using a struts frame work , where in I'm using a plugin. From the plugin i'm calling the scheduler.
The PLUGIN class is as below:
public class CJobPlugIn implements PlugIn
private static String CLASS_NAME = "CJobPlugIn";
public CJobPlugIn()
System.out.println("IN CJOb plugin Construtor");
}//constructor
* this method will be call at the end of an application
* @return void value
public void destroy()
String strMethodName = "destroy()";
try
CJobNightly.stop();
catch (Exception e)
e.printStackTrace(System.out);
}// destroy()
public void init(ActionServlet servlet,ModuleConfig moduleConfig) throws ServletException
System.out.println("In Init() of Plug IN");
String strMethodName = "init()";
try
CJobNightly.start();
catch (Exception e)
e.printStackTrace(System.out);
}// init()
}// CJobPlugIn
Here ends the plugin.
Now the Scheduler Class:
public class CJobNightly extends TimerTask
private static Timer cron; private static int run_hour; private static int runmins;
private static int dayin_mills;
private static boolean doRun; private static boolean inProcess; private static String trueStartTime; //to hold date in string value
private static Date runDate; //Date objet , to hold start date
private static String CLASS_NAME = "CJobNightly"; //class name
// private Logger logger =null;
public CJobNightly()
//logger variable initialization
//static block which sets the data porting time
static
runhour = 16;
runmins = 35;
dayin_mills = 24 * 60 * 60 * 1000;
_cron = new Timer();
trueStartTime = new Date().toString();
// runDate = getStartDate();
runDate = new Date();
inProcess = false;
public static synchronized void start()
//scheduling jobremainder to specifed date
_cron.schedule(new CJobNightly(), runDate);
doRun = true; //setting doRun=true
public static synchronized void stop()
doRun = false;
//stoping the job porting
_cron.cancel();
public void run()
String strMethod = "run()";
// logger.info(strMethod+"constructor - Run :" + doRun);
if (doRun)
startJob();
_cron.schedule(new CJobNightly(), 1 * 60 * 1000);
//logger.info(strMethod+" Run - _cron:" + _cron);
public static synchronized boolean isRunning(){
return(doRun);
public static synchronized void remoteStart()
doRun = true;
public static synchronized void remoteStop()
doRun = false;
public static synchronized void switchRunMode()
if (doRun)
doRun = false;
else
doRun = true;
public void startJob()
ExcelProcessing ep = new ExcelProcessing();
String strFileName = "D:/Book1.xls";
String strSheet1 = "Sheet1";
try{
HSSFWorkbook wb1 = new HSSFWorkbook();
wb1 = ep.readExcel(strFileName);
if(ep.worksheetExists(strSheet1,wb1)){
wb1 = ep.processSheet(wb1,strSheet1);
boolean flag = false;
flag = ep.writeExcel(strFileName,wb1);
else{
System.out.println("work sheet do not exist");
catch(Exception e){
System.out.println("Catch");
e.printStackTrace();
System.out.println(e.toString());
}// startJob()
I'm writing into an excel whenever the scheduler gets fired.So i used the
HSSF , POI.jar.
Please suggest a solution or idea tht will enable me to move further.
Thanks ,
chandrika. -
Scheduling Multiple Reports at Once
Is it possible to schedule multiple reports at once - so if I have a set of 40 reports that make up a financial close book, can I just schedule the book?
Thanks,
ChrisHi ,
use the RUN_PRODUCT() built - in procedure..... for every instance of record , if you have a multi-record-block.....
note: maybe you should give some additional info , adout what the form like , in which circumstances should the reports be called , .. ... e.t.c..
Simon -
Exception Thrown When a Scheduled Task Runs for Many Hours
In the Oracle documentation here (http://download.oracle.com/docs/cd/E10391_01/doc.910/e10367/toc.htm#CACGBDAD) it states that the below exception can get thrown when a scheduled task runs for many hours (on OAS) and can be ignored:
Primary Server went down going to get a fresh object elsewhere in the cluster.
com.evermind.server.rmi.RMIConnectionException: LRU connection
Just want to find out from other users that get this error (If there is any), have you found the scheduled task actually completes, then the error is thrown or what?
I just don't feel comfortable that one of our tasks is completing properly due to this exception occuring and causing the task to stop midway through processing...Hi,
I've had trouble with scheduling PowerShell scripts in the past as well. You can try running your script in the SYSTEM context by launching a cmd prompt this way, just to verify that the issue isn't related to the account itself:
http://myitforum.com/cs2/blogs/jmarcum/archive/2010/08/25/150872.aspx
This method does require PSExec, there's a link to the tool in the post if you don't already have it on hand.
You can also start PowerShell as SYSTEM and play around if you need to:
http://blogs.technet.com/b/ben_parker/archive/2010/10/28/how-do-i-run-powershell-exe-command-prompt-as-the-localsystem-account-on-windows-7.aspx?Redirected=true
Not the best answer, but hopefully it helps shed a little light on the issue.
Good luck.
Don't retire TechNet! -
(Don't give up yet - 12,575+ strong and growing) -
Scheduled MRP run were cancelled automatically
hi guys!
i have scheduled MRP run in MDBT with variant MRP1,then when i run it,it was released but others have been cancelled automatically by the system.why?
kindly advise.
thanks,
crimsonhttp://www.sap-basis-abap.com/pp/mrp-run-exception-description.htm
http://www.sap-basis-abap.com/pp/problem-in-the-mrp-run.htm
Check this links may be helpful.
Regards
Ravi
Maybe you are looking for
-
Can we define a Procedure in a Package Body without Defining in a Specifica
Hi, Can we define a Procedure in a Package Body without Defining in a Specification,, if yes then how...,Please provide me some examples Please helpme out.... Regards Nikhil
-
Canon EOS 100D is listed as compatible in Digital Camera RAW Compatibility Update 6.01 and when I have checked for software updates there are none available. I've downloaded the Canon software, connected to my mac via the cable and followed the inst
-
How to create a bootable copy of MacOs 10.5.8 as a start up disk
I have leopard installed on my main powermac G5 plus my two Powerbook laptops. The install disk works fine in the slot loading laptops but when I put it in the disk drive of the G5 then it isn't being read. I can hear the drive trying to read it bu
-
Has anyone figured out the sync problem with Outlook. After my 1st sync, like others, I had two calenders +(home and outlook calender+). I just synched again and now I have three (+home, outlook calender, and calender+). Data is not being transferred
-
How do i customize the FrameContentLayer (or standard app frame) in Swing?
Hey, I write all my code, compile, and view my projects in JGrasp. Whenever I run my program, there is a default frame window that displays my program. It has the Minimize, ExitOut buttons, and a standard toolbar. Does anyone know if this is the Fram