I cannot see why not but let me know if anyone has used the WVS Scheduler Administrator for other administrative tasks other than publishing and WVS. I have a sync task were I need to connect to an outside database and compare data to objects in Windchill. Seems to be the perfect vehicle to create the jobs, schedule it and monitor its execution. Assuming other scheduler tasks are defined in a similar manner, is there a more recommended method of hooking them in or kicking them off?
Solved! Go to Solution.
@avillanueva I hear you loud and clear.
The way I do this is by writing and class that I run from a Windchill shell.
The class creates a queue entry that is scheduled to run at a pre-determined time. When that time comes the class runs and does whatever it was designed to do. The very last thing the class does before completing is it creates another queue entry to run at the next pre-determined time, and so on.
Using this technique, I have full control over the execution time and frequency.
So, you could do this to connect to the external dB and run the code that compares the dB tables and columns.
Hi @avillanueva
Good idea but for some new staff it can be confusing if WWS Scheduler can do different work.
I like your idea.
I usually create own page, where I control custom tasks that I send to custom queue.
For example delete utility for visualization 😄
PetrH
At one point I saw a way to kick off a scheduler job via command line. I guess your UI and the WVS schedule are doing the same thing. Your UI seems dedicated to that visualization delete job. What's needed is something exactly like the WVS scheduler but where you can control the execution time, frequency, job type and possibly the queue it runs in.
@avillanueva I hear you loud and clear.
The way I do this is by writing and class that I run from a Windchill shell.
The class creates a queue entry that is scheduled to run at a pre-determined time. When that time comes the class runs and does whatever it was designed to do. The very last thing the class does before completing is it creates another queue entry to run at the next pre-determined time, and so on.
Using this technique, I have full control over the execution time and frequency.
So, you could do this to connect to the external dB and run the code that compares the dB tables and columns.
We have a solution from Fishbowl that works this way. I use Windchill Shell to initialize the first queue entry and then it manages itself by propagating new tasks in the queue after the scheduled one is completed. We can always come back and look in the queue to see the status of the task.
That is as deep as my explanation goes, I am not a java developer, so i will default to @d_graham for additional details.
@ScottMorris @avillanueva @HelesicPetr
You guys might be interested in this. I’ve actually done scheduling two different ways.
1. I create my own Custom Scheduling Queue. This is not necessary but I like it because I can have all custom scheduled methods in this queue which makes it easier to stay organized.
2. I have also done functionally the same thing by using Windows Task Scheduler.. In short, I create a batch file that duplicates the Windchill shell environment and then I run the java command to run the custom class. The command might include arguments to be passed to the main method that can be easily edited in the batch file or everything is hard coded in the class.
It really depends on what the company asks for.
Likewise, the decision to use a scheduling queue or Windows Task Scheduler is decided by the customer. I explain pros and cons and they decide.
I think the biggest pro to Windows Task Scheduler is anyone can easily change the schedule or run the task immediately. One doesn’t need to know anything about Windchill queues or Java programming to do that, which is attractive to Admins that are not developers.
Another advantage is that I will do this for 1/4 of what anyone else would charge and you’d get it twice as fast, maybe faster. 😁
exactly, this is a technique how the queues should be used and how they work. Schedule queue and process queue.
PetrH
@d_graham was right, I am fundamentally misinterpreting what this WVS UI is doing. The entries are really queries not scheduled jobs. A job is is created but this query method is passed in, returning a WTList object. I actually came across the right method from an older post:
Thanks for your time on this.