How to remotely schedule LiveUpdate and virus scans on Symantec AntiVirus for Macintosh 10.x clients

Article:TECH103334  |  Created: 2007-01-30  |  Updated: 2010-01-24  |  Article URL http://www.symantec.com/docs/TECH103334
Article Type
Technical Solution


Issue



You want to create a schedule to run a virus scan or run LiveUpdate on Symantec AntiVirus (SAV) for Macintosh clients using Symantec Administration Console for Macintosh (SACM).


Solution



SAV for Macintosh 10 clients include symsched, which is a command-line utility that is used to create virus scan and LiveUpdate schedules. Symantec Administration Console for Macintosh server does not have a specific command for scheduling. You can use the "Run Custom Script" command to schedule virus scans and LiveUpdate with a symsched command.

Note: For more information on symsched command line parameters, or if you are using SAV for Macintosh versions 10.0 or 10.1.1/SACM version 1.0.1, please see Technical Information below.


How to deliver a Scheduled Scan or Scheduled LiveUpdate to managed clients
  1. In the Symantec Administration Console for Macintosh (SACM), choose Send Commands.
  2. Under Send Command Options, choose who receives this command (or save the command as a template if you expect you will need to send this script more than once).
  3. Under the Command drop-down menu, under General Commands, choose Run Custom Script, then click Specify Parameters.
  4. Create a command label to identify this command in the Command Log, a command expiration, a key ID and that key ID's password.
  5. In the script box, enter the symsched command you would like to run on the blank line just above exit 0 (Script arguments 1-4 are not necessary). The full path to symsched must be specified. See Examples below for command structure.
  6. Click on Command to then send the command. You can review the Command Log to ensure the command is received.


Examples:


1. To schedule a weekly virus scan on one or more clients, called "Weekly Virus Scan," every Monday at 11 p.m. in the Users directory, send the following command with the "Run Custom Script" command. This command will scan the /Users folder and all subfolders, and the UI display is set to Off.
    #!/bin/sh
    #Type your script here.
    "/Applications/Symantec Solutions/Symantec Scheduler.app/Contents/Resources/symsched" VirusScan "Weekly Virus Scan" 1 0 -w 1 23:00 /Users
    exit 0


    The following command will scan the entire drive, and the UI display is set to On:

    #!/bin/sh
    #Type your script here.
    "/Applications/Symantec Solutions/Symantec Scheduler.app/Contents/Resources/symsched" VirusScan "Weekly Virus Scan" 1 1 -w 1 23:00 /
    exit 0


2. To schedule a weekly virus definitions update, called "Weekly VDefs Update", every Thursday at 7 p.m., in the background (running silently), with the UI display set to On, send the following command with the Run Custom Script command:
    #!/bin/sh
    #Type your script here.
    "/Applications/Symantec Solutions/Symantec Scheduler.app/Contents/Resources/symsched" LiveUpdate "Weekly VDefs Update" 1 1 -w 4 19:00 "Virus Definitions" -quiet
    exit 0

Additional Information

Since the scripts sent by the SACM are running as root, the user would have to be logged in as root in order to see the scheduled event display in the Symantec Scheduler GUI if the UI display switch is set to 1 (On). To verify on a local client while logged in as a regular user or administrator that a schedule sent out from the server has been received, type the following in Terminal (the switch is a lower case "L"):
      sudo symsched -l

You are prompted for an administrator password. After you enter your password, symsched displays a summary of the schedules you set up, similar to the following:

      Module Name On Freq Day Time Args
      ----------- ---------------------- --- -------- ----- ----- ----
      VirusScan Weekly Virus Scan 1 Weekly 1 23:00 '/Users'
      LiveUpdate Weekly VDefs Update 1 Weekly 4 19:00 "Virus Definitions" -quiet

To delete all schedules on one or more clients, send the following command from the SACM with the Run Custom Script command:

      #!/bin/sh
      #Type your script here.
      "/Applications/Symantec Solutions/Symantec Scheduler.app/Contents/Resources/symsched" -d all
      exit 0

Apple Remote Desktop

You can also use Apple Remote Desktop to send the symsched command. Look for the "Send UNIX Command" feature in Apple Remote Desktop, and refer to the documentation for more information. Be sure to specify the root account in the "Send UNIX Command" dialog box.



Technical Information
For additional clarification on the command switches (provided below), please see 'Guide to symsched Command-line Switches' (Document ID 2008072912573848)


/usr/bin/symsched version 4.0.1f1 (02/23/07 15:00:07)
© 2007 Symantec Corporation, All rights reserved.

Usage:
symsched -V                 // show version info
symsched -h                 // print this message
symsched -l [-U]            // list all scheduled tasks (-U => unformatted)
symsched -d | all    // delete named tasks or all tasks
symsched [-f] module name on UI frequency [day] time arguments
                            // to add new task
    Optional argument for add: -f forces overwrite of existing task
    Required arguments for add/edit:
    module    is one of:    VirusScan   LiveUpdate
    name      is a UTF8 string for the task name ( escape shell special chars )
              unless the -f option is specified it is an error if a task already
              exists with the same module and name
    on        is 1 if task is enabled, 0 if disabled
    UI        is 1 if task is shown on Scheduler UI, 0 if not shown
    frequency is one of the localized or non-localized frequencies shown below
              non-localized: -monthly -weekly -daily -annually -hourly
              localized: Monthly Weekly Daily Annually Hourly
              only enough characters needed to guarantee uniqueness
    day       is according to frequency:
              for Monthly day is day of month (1-28)
              for Weekly day is day of week (0-7)
              for Daily day not used (leave out)
              for Annually day is MM/DD date
              for Hourly day not used (leave out)
    time      is HH:MM in 24 hour format
              for hourly the hour indicates the frequency (every HH hours ), MM indicates what minute of the hour
    arguments according to the module:
              for VirusScan [-niceness [-20..20]] pathname [[pathname]...]
              for LiveUpdate "All Products" | "LiveUpdate" | "Norton AntiVirus" | "Virus Definitions" [-quiet]



WARNING: Versions of Symsched older than 4.0.1f1 (LiveUpdate version 4.0.4 and older) do not require the additional "UI" parameter (0 or 1) which specifies whether the event will be displayed in the scheduler GUI; the full path to symsched is also not required. If you try to send a command in the newer format as given above from the SACM, it will fail. You can verify the version of symsched you are using by opening up a Terminal window and entering symsched -V.

/usr/bin/symsched version 3.0 (051)
© 2005 Symantec Corporation, All rights reserved.

Usage:
symsched -V // show version info
symsched -h // print this message
symsched -l [-U] // list all scheduled tasks (-U => unformatted)
symsched -d | all // delete named tasks or all tasks
symsched [-f] module name on frequency [day] time arguments
// to add new task
Optional argument for add: -f forces overwrite of existing task
Required arguments for add/edit:
module is one of: VirusScan LiveUpdate
name is a UTF8 string for the task name ( escape shell special chars )
unless the -f option is specified it is an error if a task already
exists with the same module and name
on is 1 if task is enabled, 0 if disabled
frequency is one of the localized or non-localized frequencies shown below
non-localized: -monthly -weekly -daily -annually
localized: Monthly Weekly Daily Annually
only enough characters needed to guarantee uniqueness
day is according to frequency:
for Monthly day is day of month (1-28)
for Weekly day is day of week (0-7)
for Daily day not used (leave out)
for Annually day is MM/DD date
time is HH:MM in 24 hour format
arguments according to the module:
for VirusScan [-niceness [-20..20]] pathname [[pathname]...]
for LiveUpdate "All Products" | "LiveUpdate" | "Norton AntiVirus" | "Virus Definitions" [-quiet]

For symsched versions prior to 4.0.1f1:

Example to schedule a weekly virus scan on one or more clients, called "Weekly Virus Scan," every Monday at 11 p.m. in the Users directory:


    #!/bin/sh
    #Type your script here.
    symsched VirusScan "Weekly Virus Scan" 1 -w 1 23:00 /Users
    exit 0

To schedule a weekly virus definitions update, called "Weekly VDefs Update", every Thursday at 7 p.m., in the background (running silently):

    #!/bin/sh
    #Type your script here.
    symsched LiveUpdate "Weekly VDefs Update" 1 -w 4 19:00 "Virus Definitions" -quiet
    exit 0





Legacy ID



2007393022179698


Article URL http://www.symantec.com/docs/TECH103334


Terms of use for this information are found in Legal Notices