cancel
Showing results for 
Search instead for 
Did you mean: 

Schedulet task startup after portal restart.

Former Member
0 Kudos

Hello.

How to configure task to have it automatically started with the portal startup?

So far my tasks disappears after restart.

Marek.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Portal services start while the portal is starting up!

How abt writing a task inside the portal service and have it automatically run everytime the portal starts??

Correct me if iam wrong!

Thanks.

P.

Former Member
0 Kudos

Dear Peter.

The task can be created and removed by a user in iView. Also there the user can configure the time of task run.

The essence of the code is:

<code>

//sorry for line breaks

ISchedulerService schedulerService =(ISchedulerService)

ResourceFactory.getInstance().

getServiceFactory().

getService(IServiceTypesConst.SCHEDULER_SERVICE);

ISchedulerTimeTable aSchedulerTimeTable =

schedulerService.createTimeTable();

ISchedulerTime aSchedulerTime =

schedulerService.createTimeWildcard();

// day hour minute : methd parameters taken from jsp

ok = aSchedulerTime.set( Calendar.DAY_OF_MONTH , day );

ok = aSchedulerTime.set( Calendar.HOUR_OF_DAY , hour );

ok = aSchedulerTime.set( Calendar.MINUTE , minute );

aSchedulerTimeTable.addToTable(aSchedulerTime);

// taskName, properties are costants in the class

ISchedulerEntry aSchedulerEntry =

schedulerService.createSchedulerEntry(

taskName,2,aSchedulerTask,

aSchedulerTimeTable,properties );

</code>

So, I am writing task inside the portal service and it desapear after restart.

Im I doing something wrong ?

Marek

Former Member
0 Kudos

Hi Marek,

see this forum thread about how to run a scheduler task/service directly after restart of the server:

/thread/91064 [original link is broken]

Best regards,

Stefan Brauneis