scheduled thin clients file

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7362
    cobra02
    Member
    • Total Post: 13
    • Regular Joe
    • ★★

    I use to following sql file to schedule shutdown of my thin clients.

    Could you please help me to modify it so that I can select some clients by ID (e.g 2 or 3) and not all of them as below :

    Thanks


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[sp_Recurring_Updates_MD]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].sp_Recurring_Updates_MD
    GO

    CREATE PROCEDURE [dbo].sp_Recurring_Updates_MD
    @PackageName nvarchar(64)
    AS
    BEGIN
    DECLARE @ClientID int
    DECLARE @DeviceList CURSOR
    DECLARE @PackageID int
    DECLARE @Now smalldatetime

    SET @clientID=2
    SET @Now = GETDATE()
    SET @PackageID = (SELECT SoftwarePackageId
    from SoftwarePackage
    where UPPER([name]) = UPPER(@PackageName))

    SET @DeviceList =CURSOR FOR
    SELECT ClientID
    FROM [RapportDB].[dbo].[ClientNetwork]


    OPEN @DeviceList
    FETCH NEXT FROM @DeviceList INTO @ClientID
    WHILE (@@FETCH_STATUS = 0)
    BEGIN
    exec sp_addupdcommand @Now,@ClientID,@PackageID,1,1,@Now,5,1,0,0,'',1
    -- Select @ClientID, @PackageID, GETDATE()
    FETCH NEXT FROM @DeviceList INTO @ClientID
    END
    CLOSE @DeviceList
    DEALLOCATE @DeviceList
    END
    GO



    #22399
    ConfGen
    Keymaster
    • Total Post: 11485
    • Jedi Master
    • ★★★★★★★

    Which clients do you have? Why don’t you use the WDM build-in function for reoccuring packages?

    CG

    #22400
    cobra02
    Member
    • Total Post: 13
    • Regular Joe
    • ★★

    I use Wyse V30.

    You talk about last release of WDM 4.9 which implements reccuring packages but not in workgroup version ?

    #22407
    ConfGen
    Keymaster
    • Total Post: 11485
    • Jedi Master
    • ★★★★★★★

    Yes

    CG

    #22408
    cobra02
    Member
    • Total Post: 13
    • Regular Joe
    • ★★

    So is it whereas possible to modify this sql file ?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.