How do you run scheduled tasks?

Posted by James Palmer on 07-Jul-2015 04:53

Out of interest, those of you running Windows servers, how do you run your scheduled jobs? 

Currently we have scheduled tasks that run a .bat file that sets the environment variables, and then calls prowin/progres as necessary. The issue here is that as soon as the .bat finishes, the scheduler considers its job done and marks the task as complete. It's not causing us issues at the moment, but I can see scenarios in the future where it would be very helpful for the scheduler to know if the job is done or not. 

So what I'd ideally like to do is to call prowin/progres directly from the scheduler, rather than having the middle step of the .bat. I've set all the environment variables necessary, but my tasks just don't run. This is Windows 2012 R2. Any thoughts much appreciated. 

All Replies

Posted by Mike Fechner on 07-Jul-2015 04:58

I prefer to use Jenkins with ANT and PCT: Flexible scheduling patterns, dependent jobs, tracking of all console output (MESSAGE statements) in the browser console, keeps history of job execution and result and can Email you on job failure or success.
 
+ it works on Unix/Linux the same way.

Posted by James Palmer on 07-Jul-2015 05:24

I've heard a bit about Jenkins and Ant on here. So Ant/PCT is the stuff to do Progress compiles? And Jenkins you use for the scheduling? Sorry the whole CI world is new to me in terms of terminology and jargon!

Posted by Mike Fechner on 07-Jul-2015 05:29

In the end it's a task scheduler with a browser based console that executes Ant scripts. And PCT teaches ant how to do OpenEdge.

Von meinem Windows Phone gesendet

Von: James Palmer
Gesendet: ‎07.‎07.‎2015 12:24
An: TU.OE.Deployment@community.progress.com
Betreff: RE: [Technical Users - OE Deployment] How do you run scheduled tasks?

Reply by James Palmer

I've heard a bit about Jenkins and Ant on here. So Ant/PCT is the stuff to do Progress compiles? And Jenkins you use for the scheduling? Sorry the whole CI world is new to me in terms of terminology and jargon!

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by James Palmer on 07-Jul-2015 05:32

Right I see. Might have to have a play around with it. Thanks Mike.

Posted by Rom Elwell on 07-Jul-2015 06:21

Another vote for Jenkins with Ant with PCT.  This configuration provides ample latitude to setup nearly any job, as Mike alluded to above...

Posted by James Palmer on 07-Jul-2015 08:32

So I've installed Jenkins locally. Do I need Ant/PCT if all I'm trying to do is run .p's?

Posted by Mike Fechner on 07-Jul-2015 08:44

It just makes it easier.

Posted by Riverside Software on 07-Jul-2015 11:40

Jenkins is awesome to replace a small crontab or small list of scheduled tasks. Just be careful, it will still need some monitoring (you may be running out of executors for example), and it's not a *real* scheduler.

Jenkins slaves are perfect if you want to coordinate jobs between machines.

Posted by Michael Jacobs on 07-Jul-2015 14:18


The proper setting is:

        <intercept-url pattern="/static/home.html" 

                       access="hasAnyRole('ROLE_PSCUser')"/>

Note: is ROLE_PSCUser modified to whatever the correctly configured/coded role name is?

The first think to look at: does the security policy work with a http client other than the JSDO?
You can use a browser if you have one of the REST add-ons that allow you to control the body and headers.

Then next first thing to look at is:  are you sure that the logs (with DEBUG level) are not showing an authentication failure?

If you cannot login/logout using a browser and SOAP plugin - then the issue is in the REST service.   If the browser test works - the issue is in the client.

To eliminate the server side Brent really should be supplying the REST service's log file ( with DEBUG settings for security packages ) that will allow tracking of the server's exact behavior in a failure case.

Mike J.

[collapse]
From: Riverside Software <bounce-rssw@community.progress.com>
Reply-To: "TU.OE.Deployment@community.progress.com" <TU.OE.Deployment@community.progress.com>
Date: Tuesday, July 7, 2015 at 12:40 PM
To: "TU.OE.Deployment@community.progress.com" <TU.OE.Deployment@community.progress.com>
Subject: RE: [Technical Users - OE Deployment] How do you run scheduled tasks?

Reply by Riverside Software

Jenkins is awesome to replace a small crontab or small list of scheduled tasks. Just be careful, it will still need some monitoring (you may be running out of executors for example), and it's not a *real* scheduler.

Jenkins slaves are perfect if you want to coordinate jobs between machines.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by James Palmer on 07-Jul-2015 16:28

So when you say small what do you mean? I'm guessing our ~200 tasks isn't small? In which case, I'm best off not using Jenkins. Unfortunately, until we can convince the FD that we need Pro2 Replication, most of those jobs will not be going away.

Posted by Mike Fechner on 07-Jul-2015 23:30

Jenkins has no problem in running jobs that go for hours. Our release job takes four hours for instance.

Depending on your CPU performance you can run many jobs in parallel as well. Jenkins does not consume a lot performance for itself. It's mainly the performance needed for your ABL batch jobs. And that is no different from the performance it would take to run them from the Windows scheduler. When running lots of jobs Jenkins can run then in a sequence as well instead of in parallel or a mix. Windows scheduler can't do that....

To me the Jenkins task console is easier to use with a relative large number of tasks compared to Jenkins. Plus you get the email features on failure for free.

Von meinem Windows Phone gesendet

Von: James Palmer
Gesendet: ‎07.‎07.‎2015 23:29
An: TU.OE.Deployment@community.progress.com
Betreff: RE: [Technical Users - OE Deployment] How do you run scheduled tasks?

Reply by James Palmer

So when you say small what do you mean? I'm guessing our ~200 tasks isn't small? In which case, I'm best off not using Jenkins. Unfortunately, until we can convince the FD that we need Pro2 Replication, most of those jobs will not be going away.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

This thread is closed