cancel
Showing results for 
Search instead for 
Did you mean: 

Wait Event on SLEEP

Former Member
0 Kudos

Hi Experts,

I have an strange requirement to setup Wait Event  on SLEEP function. I am using the System_Sleep definition for Sleep but I don't know how to maintain Wait Event on Sleep.

When I right click on definition: System_Sleep, I am not seeing Duplicate function and its disable but i will see duplicate when i right click on SAP_AbapRun.


Thanks,

Shiva

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks a lot Gerben Works like a charm.

Former Member
0 Kudos

Hi Shiva,

Were you able to get through with a solution. I am having a similar requirement where i need to put a sleep time in between two jobs in a job chain and Redwood does not allow std job definitions Systemsleep as they are on different isolation groups.

My requirement is Job1 -> Sleep for some set time -> Job2 (Starts after like 5 min after Job1 completes)

Thanks,

Shet

gmblom
Active Contributor
0 Kudos

Hello,

Put =Time.expressionNow('add 5 minutes') in the Start Time field of the scheduling parameters of Job2 in the chain.

Otherwise, use the final status handler

Regards Gerben

abhishek_singh29
Active Participant
0 Kudos

Hi,

You can create your own sleep jobs and call the wait event or either create a Job chain with System_Sleep and call the wait event on chain level. There are so many others ways also doing it.

Regards,

Abhishek

Former Member
0 Kudos

Thank you for the inputs. My question is how do we create Sleep Job as it's not allowing me to duplicate System_Sleep definition.


It would be helpful if you point me in detail navigation.


Thanks,

Shiva

abhishek_singh29
Active Participant
0 Kudos

Use below code in RedwoodScript job type, Thread.sleep is in Millisec.

package com.redwood.scheduler.custom;

import java.math.BigDecimal;

import java.util.Iterator;

import com.redwood.scheduler.api.date.DateTimeZone;

import com.redwood.scheduler.api.model.*;

import com.redwood.scheduler.api.model.enumeration.*;

public class name

extends nameStub

{

public void execute()

throws Exception

// ... Lots of code ...

{try

{

   Thread.sleep(60000);

}

catch (InterruptedException e)

{

    Thread.currentThread().interrupt();

}

}

}

Regards,

Abhishek