SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Running a Job on specific months.

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Running a Job on specific months.
Author Message
dave



Joined: 16 Jun 2003
Posts: 41

Post Running a Job on specific months. Reply with quote

Hi,

I need to be able to run a job on specified months.

Example:

For the year of 2005 I need to run a job on January 1, Aprile, August1, and November 1.

Can you help me with the Syntax for that?

I would prefer VBS but JAL would be fine.

Thanks for your help.

Wed Nov 17, 2004 11:54 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Running a Job on specific months. Reply with quote

Schedule this job to run on the first day of every month

Select script type for the job.

If you choose VBScript enter the following script

Dim pid, vb24x7
Select Case MonthName(Month(Now), False)
Case "January", "April", "August", "November"
Set vb24x7 = CreateObject("vb24x7.Process")
pid = vb4x7.Run("[enter full command line here]")
Set vb4x7 = nothing
End Select

If you choose JAL enter the following script

Dim pid, number
ChooseCase @T"mmmm", END_CHOOSE
Case "January", "April", "August", "November"
Run "[enter full command line here]", "", pid
END_CHOOSE:

: Hi,

: I need to be able to run a job on specified months.

: Example: For the year of 2005 I need to run a job on January 1, Aprile,
: August1, and November 1.

: Can you help me with the Syntax for that?

: I would prefer VBS but JAL would be fine.

: Thanks for your help.

Wed Nov 17, 2004 12:30 pm View user's profile Send private message
dave



Joined: 16 Jun 2003
Posts: 41

Post Re: Running a Job on specific months. Reply with quote

: Schedule this job to run on the first day of every month

: Select script type for the job.

: If you choose VBScript enter the following script

: Dim pid, vb24x7
: Select Case MonthName(Month(Now), False)
: Case "January", "April", "August",
: "November"
: Set vb24x7 = CreateObject("vb24x7.Process")
: pid = vb4x7.Run("[enter full command line here]")
: Set vb4x7 = nothing
: End Select

: If you choose JAL enter the following script

: Dim pid, number
: ChooseCase @T"mmmm", END_CHOOSE
: Case "January", "April", "August",
: "November"
: Run "[enter full command line here]", "", pid
: END_CHOOSE:

Great I appreciate your help.
2 Questions:

1) Whne I put the Months without a specific date does
that mean it will pring on the first? Thats when I want it
printed.

2) This script will kick of a .vbs script. I assume I need to
put the full directory path to that script?

Wed Nov 17, 2004 1:02 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Running a Job on specific months. Reply with quote

You need to enter a specific day number in to the Day field, which in you case is 1.

Yes, you need to put the full .vbs file name including path.

By the way, if you convert your .vbs script into a VBS job (normally requires just 2 more lines of code Sub Main and End Sub) you immediately gain complete and robust error handling, automatic notifications in the event of a script error, graphical editor and debugger options, options for automatic deployment on another machine, and a lot more.

: Great I appreciate your help.
: 2 Questions: 1) Whne I put the Months without a specific date does
: that mean it will pring on the first? Thats when I want it
: printed.

: 2) This script will kick of a .vbs script. I assume I need to
: put the full directory path to that script?

Wed Nov 17, 2004 1:23 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.