cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduler Thing with Java Code

ses
Newbie
Newbie

Scheduler Thing with Java Code

Hi Friends,

I would like to know how we can plugin a Java Code with Thing Scheduler.

Basically I want to execute a Java Code Snippet when the scheduler is invoked.

Any help in this topic is highly appreciated.

Thanks.

Tags (2)
6 REPLIES 6

Re: Scheduler Thing with Java Code

You could package the Java code up as a Thingworx Extension (as per the Marketplace) and then import it into Thingworx and call  its methods via a scheduler

Re: Scheduler Thing with Java Code

Thanks Graham Allan. It really helped me. Many thanks...

Re: Scheduler Thing with Java Code

Hi Graham,

I was able to configure the scheduler and assign a service to trigger.

My cron job was to execute in every 10 mins.

But it seems it is not triggered, How can we check if it works or any errors.

No traces are found in ApplicationLog file.

Any tricks?

Re: Scheduler Thing with Java Code

Create some logging message with logging Snippets ( logger.info("message"); ) , do it on the first line of the subscription code.

Also take a look on the user which it's executing the service on subscription, as it can be different from the normal user and don't have all the needed rights.

Also do a restart on the scheduler thing once changed the scheduler, sometimes it doesn't updates the subscription correctly.

Re: Scheduler Thing with Java Code

Thanks Carles, for the suggestions.

It got verified, scheduler was working actually.

Logs are coming when I changed the ScriptLog setting @ Monitoring->Configuration section.

Re: Scheduler Thing with Java Code

Yup, you should change settings depending which log level you want to record

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.