Quantcast
Channel: PTC Community : All Content - Windchill
Viewing all articles
Browse latest Browse all 6049

Getting the most from the WVS Job Scheduler

$
0
0

In this article, I’ll provide some tips and tricks that will hopefully enable you to really start leveraging the potential of the WVS Job Scheduler.  I’m sure many of you are aware of this tool and using it already, at least in a basic form but for those that are new to it, here’s a quick intro.

 

The WVS Job Scheduler allows you to schedule the creation and execution publish, print, thumbnail, interference detection and clean-up jobs, in a specific context, at a specific day / time and optionally repeats the job execution on a timed schedule.  Depending on their type, these scheduler jobs will result in Publish, Clash or Print Jobs being added to the WVS Publisher Queue or the execution of clean-up or thumbnail generation for the objects returned by a predefined Windchill query.

 

Before we get started. some useful tips that might avoid embarrassing Scheduler faux pas:

  • Always test scheduler jobs using the Only create log file option
  • Limit publish jobs by launching the WVS Job Scheduler Administration utility in Product or Project contexts
  • Increase the wt.pom.querylimit for particularly large contexts (CS124149)
  • Always delete all WVS Scheduler Jobs prior to migration to avoid issues relating to changes in the database model (CS64089)

 

Customized Scheduler Methods

Out-of-the-box scheduler methods are defined in com.ptc.wvs.server.schedule.ScheduledJobQueries.class and PTC ships the Java source under the prog_examples in your Windchill home.  The ScheduleJobs.class since Windchill 10.0 only provides supported utility methods.

 

The basic approach for creating a custom Scheduler Method is documented in the Custom Publishing Help Center topic (PDF).  You’ll need basic understanding of Java programming and Windchill customization. The intent is that you use the sample methods in ScheduledJobQueries.java to create your own customized methods.  The only limit is your imagination!

 

In the References below, I include links to a few articles that provide real world examples of custom scheduler methods.  Feel free to download, reuse or customize these to your own requirements.

 

The perennial challenge for PTC has been providing Scheduler methods that will satisfy all customers’ needs.  One approach, that allows you to be in complete control over what is and is not published, is to create a custom method that simply processes a list of OID's from a text file you created.  With basic Windchill customization skills, this should not be difficult to implement as followings:

  1. Create the text file containing the EPMDoc OID's of the objects that need to be processed; this can be achieved using SQL, Windchill Query Builder or even Creo View Search tools, for example.
  2. Create a WTDoc and upload this file as the primary content (could make this a WTDoc sub-type, context specific and be access controlled as required)
  3. Write the custom Scheduler method (using a relevant out-of-the-box method as a basis) that:
    1. Locates the WTDoc
    2. Downloads the primary content file for the latest iteration
    3. Reads the OID's from it in to an array
    4. Cycles through the EPMDoc OID’s and returns a WTList of EPMDocs to publish and/or Representations to republish

 

Why not dive in and try it?  Or maybe one of you has already achieved this and is willing to share the code here?

 

As always, I welcome your comments, questions and will answer them if I can.

 

References:

Basic WVS Scheduler info:

WVS Scheduler articles providing some real world examples of what can be achieved:

  • Article CS211115 provides a method that enables the republishing (or publishing) of default EPMDoc representations based on criteria defined in a separate properties file, e.g. CAD content type (file extension) and life-cycle state.
  • Article CS187307 provides an alternative to the out-of-the-box methods for use with large query results by batch chunking rather than using a paging query spec

Viewing all articles
Browse latest Browse all 6049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>