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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Scheduler Thing with Java Code

ses
1-Newbie
1-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.

6 REPLIES 6
gallan
4-Participant
(To:ses)

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

ses
1-Newbie
1-Newbie
(To:gallan)

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

ses
1-Newbie
1-Newbie
(To:ses)

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?

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.

ses
1-Newbie
1-Newbie
(To:CarlesColl)

Thanks Carles, for the suggestions.

It got verified, scheduler was working actually.

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

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

Top Tags