New Boundary Support Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Populate Based on TimeExpand / Collapse
Author
Message
Posted 1/9/2004 4:49:00 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Advanced Members
Last Login: 1/21/2004 10:48:00 AM
Posts: 154, Visits: 1
Build a Rule based on Prism's variable %PT_HOUR% which resolves to the current hour in military time (00-23). Use this Group to assign Tasks that should only be distributed at certain times such as non-business hours. For example, to create a Configuration Group that populates when the computer time is between 1 a.m. and 6 a.m., create the following Rule

("%PT_HOUR%" >= "01") AND ("%PT_HOUR%" < "06")

Post #62
Posted 10/28/2008 5:12:56 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 1/13/2010 7:46:11 AM
Posts: 23, Visits: 108
I know this is really old, but how would someone go about doing this?  It seems the scripting language does not allow the use of "AND" in a statement.

I would like to run a script but make sure it only runs between a specific time on a specific date.

Any thoughts?

Post #1710
Posted 10/29/2008 6:49:42 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2/12/2011 11:11:06 PM
Posts: 742, Visits: 1,211
Yes, you can do that with a rule like this:

(("%PT_HOUR%" >= "01") AND ("%PT_HOUR%" < "08")) AND (("%PT_Date%" = "29" ) AND ("%PT_Month%"="10") AND ("%PT_YEAR%"="2008"))



New Boundary Technologies Support
support@newboundary.com

Post #1712
Posted 10/30/2008 10:56:50 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 1/13/2010 7:46:11 AM
Posts: 23, Visits: 108
My fault for posting in the wrong sub-forum.  But here I go again doing it.

My question is how can we do this with a .PTS ?  I can make it working nesting IF's but it looks ugly.  Can I get the first 4 lines of the script below into 1 line?

Ex. This example checks for specifc date then the time window and executes the Office2k7 custom setup then also runs a package which only adds a registry entry that states the script was run in time window alotted.  If the script is not run in the time window then a different package is installed that sets a registry value and lets the user know the office install will retry again later.

If %PT_MONTH% == "10"
 If %PT_DATE% == "29"
  If %PT_HOUR% >= "16"
   If %PT_HOUR% < "17"
   /Run \\server\o2k7ProPlus\setup.exe /config \\server\o2k7ProPlus\ProPlus.WW\Config.xml /adminfile \\server\o2k7ProPlus\ProPlus.WW\ProPlus-Desktops.MSP
   /IP "\\server\DeployPackages\Office2007RunFlag.pwc" /Always
   Else
   /IP "\\server\DeployPackages\Office2007NotRunFlag.pwc" /Always /AfterPrompt
   EndIf
  Else
  /IP "\\server\DeployPackages\Office2007NotRunFlag.pwc" /Always /AfterPrompt
  EndIf
 Else
 /IP "\\server\DeployPackages\Office2007NotRunFlag.pwc" /Always /AfterPrompt
 EndIf
Else
/IP "\\server\DeployPackages\Office2007NotRunFlag.pwc" /Always /AfterPrompt
EndIf

Post #1713
Posted 11/18/2008 11:58:20 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 2/12/2011 11:11:06 PM
Posts: 742, Visits: 1,211
The following should work, give it a try (ignore line wrapping):

IF ("%PT_Month%"="10") AND ("%PT_Date%" = "29" ) AND ("%PT_HOUR%" >= "16") AND ("%PT_HOUR%" < "17")
            /Run
\\server\o2k7ProPlus\setup.exe /config \\server\o2k7ProPlus\ProPlus.WW\Config.xml /adminfile \\server\o2k7ProPlus\ProPlus.WW\ProPlus-Desktops.MSP
            /IP "\\server\DeployPackages\Office2007RunFlag.pwc" /Always

ELSE

/IP "\\server\DeployPackages\Office2007NotRunFlag.pwc" /Always /AfterPrompt
ENDIF




New Boundary Technologies Support
support@newboundary.com

Post #1721
Posted 11/26/2008 4:57:19 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 1/13/2010 7:46:11 AM
Posts: 23, Visits: 108
This worked.  Thank you.
Post #1723
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: New Boundary Support

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 3:58am

Powered By InstantForum.NET v4.1.3 © 2012
Execution: 0.328. 11 queries. Compression Enabled.