Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Re: background processing

$
0
0

the answer is..

 

first all onStartup scripts will be executed, then the event for background processing will be triggered.

 

you can make small check:

1) select "Display Message Types: All"

Capture.PNG

 

2) place on startup:

 

APPLICATION.createInfoMessage("On Startup 1");

APPLICATION.doBackgroundProcessing();

APPLICATION.createInfoMessage("On Startup 2");

 

3) and on background processing:

 

APPLICATION.createInfoMessage("On Background");

 

the output will be (messages are sorted from bottom to top):

Capture.PNG

 

and this is the sequence how it will be executed.

 

Any special requirement for this question?

 

You can also execute background processing more times, for this, you need to create an integer variable and place this code (for 2 times execution):

 

APPLICATION.createInfoMessage("On Background : " + BACKGROUND_COUNT);

 

if(BACKGROUND_COUNT == 0){

  // the first time

}

 

if(BACKGROUND_COUNT == 1){

  // the second time

}

 

BACKGROUND_COUNT = BACKGROUND_COUNT + 1;

 

if(BACKGROUND_COUNT < 2) {

  APPLICATION.doBackgroundProcessing();

}

 

All answered?

 

Karol


Viewing all articles
Browse latest Browse all 8533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>