How to make use of gs.sleep() in a scoped application scripts


A scoped application doesn't honor direct use of "gs.slppe()" function in "Application scope" scripts.

Release or Environment

All Versions


The "gs.sleep()" function can't be used in scoped application scripts, as this falls under the global scope. But to make use of this function follow the below process.


var SleepForScoppedApp = Class.create();
SleepForScoppedApp.prototype = {
    initialize: function() {},
    sleep: function(time) {
    type: 'SleepForScoppedApp'

Additional Information

Kindly refer to the following community article.

Using gs.sleep in a scoped application