# plugins.scheduler.addJob function not working.

**URL:** <https://forum.servoy.com/t/plugins-scheduler-addjob-function-not-working/7276>\
**Category:** Classic Servoy\
**Created:** [March 30, 2007, 10:03am UTC](https://forum.servoy.com/t/plugins-scheduler-addjob-function-not-working/7276 "2007-03-30T10:03:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dp500](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@dp500](https://forum.servoy.com/u/dp500)\
**Post date:** [March 30, 2007, 10:03am UTC](https://forum.servoy.com/t/plugins-scheduler-addjob-function-not-working/7276/1 "2007-03-30T10:03:28Z")

</div>

Hi All,

I was just testing the scheduler plugin …, but it is not working .

```auto
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('in20seconds',startDate,'showTestDialog',20000,40,endDate)

```

showTestDialog=Global Function name.

The error i got:

```auto
Can't find method com.servoy.extensions.plugins.scheduler.SchedulerProvider.js_addJob(string,java.util.Date,string,number,number,java.util.Date).
org.mozilla.javascript.EvaluatorException: Can't find method com.servoy.extensions.plugins.scheduler.SchedulerProvider.js_addJob(string,java.util.Date,string,number,number,java.util.Date).

```

But the plugin is inside the plugin folder.

Please help.

Thanks  
DP

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [March 30, 2007, 10:37am UTC](https://forum.servoy.com/t/plugins-scheduler-addjob-function-not-working/7276/2 "2007-03-30T10:37:07Z")

</div>

The error doesn’t say that the plugin is missing but that you are calling the method wrong.

Your mistake is the way you pass the global method. You are passing a String, not a Function (method). So change it to

```auto
plugins.scheduler.addJob('in20seconds',startDate,globals.showTestDialog,20000,40,endDate)

```
