JAMS Tips

MVP Systems Software is a leader

in Enterprise Job Scheduling

JAMS Tip of the Month

Did you know that JAMS Variables could contain PowerShell code?

A JAMS variable can be used to display a common date in multiple Jobs. The first step is to create a new JAMS variable with a "Text" data type as seen below:

In the example above, the variable's value utilizes the JAMS PowerShell snap-in to specify the natural language date specification "Last day of last month - 1". A date format could also be specified in the form:

Get-Date -Date (ConvertTo-Date "Last day of last month - 1") -Format "yyyy-MM-dd"

More information on PowerShell date formats can be found here: PowerShell Date Formatting

Once saved, the variable can be referenced in the source of any JAMS PowerShell Job:

Once submitted, the Job's log would include the outputted date:

Wednesday, March 30, 2011 12:00:00 AM

Over 300,000 jobs today and it's only 17:00.

Stater NV

Check out JAMS on LinkedInRegister Now!JAMS Training Videos