Page 1 of 1

plugins.scheduler question

PostPosted: Thu Jan 12, 2012 6:02 pm
by kurtbleicken
This fires with an onShow method. But when it runs it immediately triggers the globals.logout() not waiting for the 10 minutes. What am I doing wrong? K

var startDate = new Date();
application.output(startDate)
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+600000);
application.output(endDate)
plugins.scheduler.addJob('logout',startDate,globals.logout(),20000,0,endDate)
//globals.logout is just application.exit()

Re: plugins.scheduler question

PostPosted: Fri Jan 13, 2012 10:27 am
by Harjo
By putting () after globals.logout, you are firing it directly!!

so skip the () part