plugins.scheduler question

Questions, tips and tricks and techniques for scripting in Servoy

plugins.scheduler question

Postby kurtbleicken » Thu Jan 12, 2012 6:02 pm

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()
Kurt Bleicken
Servoy 7
Executive Director, onRamp for nonprofits
kurtbleicken@gmail.com
Founder, AgentSphere, LLC
kurtbleicken@gmail.com
603.525.8019
kurtbleicken
 
Posts: 100
Joined: Mon Feb 12, 2007 11:36 pm

Re: plugins.scheduler question

Postby Harjo » Fri Jan 13, 2012 10:27 am

By putting () after globals.logout, you are firing it directly!!

so skip the () part
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4307
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 1 guest