Script automatic continue/restart after timeout -
i using default service groupsmanager , grouping scan through groups in domain, check if grouping not have owner , in case set default owner.
the number of groups in domain 2000 , causes me timeout. have tried try/catch statement within loop processes each group, google kills script on timeout.
i happy in batches, how can go on execute script 1 time timeout has occurred? or supposed monitor execution time , utilize sort of sleep?
or have face reality , restart script after each timeout.
really need response this, thanks!
/ don pedro
you shouldn't allow script time out instead seek process limited number of items @ time on specific time interval using timer trigger.
well guess reply more said done ... simple :
determine approximately how many grouping can check in 3 minutes (max execution time 5' it's improve maintain comfortable margin) count processed groups , set counter value somewhere... preferably in scriptproperties setup timer trigger every 10 minutes or calls function starting grouping indexed number memorized (the trigger can set programmatically , removed or manually in ressource menu of script editor). kill timer when have reached end of task (again manually or programmatically)hoping give plenty indications start with.
google-apps-script
No comments:
Post a Comment