Agvance Scheduled Task Requirements

Although not specifically designed to run unattended from a Windows Scheduled Task, some work has been done to allow certain features in Agvance to be run from a Windows Scheduled Task.  However, there are some limitations and requirements that MUST be followed in order for the Agvance feature to operate successfully from within a scheduled task. 

Note: Limitations and requirements noted below should be discussed with hardware technicians to determine if the network configuration allows for Agvance features to be run from a scheduled task. SSI can clarify the information below with a hardware technician but will not be responsible for establishing or troubleshooting scheduled tasks. The alternative to setting up a scheduled task is to run the function manually.

Requirements

  • The Windows user that the scheduled task will run as MUST be logged into Windows at the time the scheduled task is to run.
  • The Windows user MUST have access to the Agvance program files, data directory, and other file paths that are used by the specific feature being run as a scheduled task. Also, some features that can be run from a scheduled task write file(s) to a directory. The Windows user MUST have the ability to write files to that directory.
  • The Windows user MUST have the appropriate modules activated to run the specific feature.

Tips

  • For various reasons, it is possible that a drive mapping will be lost prior to the scheduled task running. It is recommended that the scheduled task run a batch file that will first map the drives and then run the command line to execute the Agvance feature.
  • Because servers will be rebooted after Windows updates or could be as part of a nightly routine, the Windows user that the scheduled tasks run as could be logged in automatically on a reboot.
  • When a Windows password changes for the user running the scheduled task, remember to go to the scheduled task and select Set Password to enter the new password.
  • If the Agvance data moves to a new/different server and the computer name in the drive mapping changes, remember to change the drive mapping in the batch file if running the batch file from a scheduled task.

 Agvance Features Allowed to Run from a Scheduled Task

FeatureModules RequiredEXE NameCommand Line Parameters
Web ExportHubAfexport.exe

A/R - ar
Grain - grain
Field Plans - plan

TouchStar ExportHub, Accounting, EnergyAgvlpkf.exe

GasPac - gaspac
Fuelware - fuelware

Setting up the Batch File

  1. Use the net stat command to map the necessary drives (ie. Agvance data directory).  Ex. net stat s: \\serverdata\drvc\avdata
  2. Change the drive letter.  Ex. s:
  3. Change the directory to the Agvance data directory.  Ex. cd avdata
  4. Enter the command line that the scheduled task should run.  See the table above specifying the parameter that should be part of the command line.
    • Ex. C:\program files\agvance\afexport.exe ar
  5. Exit the batch file.  Ex. exit
  6. The batch file can be written in Notepad and saved with a .bat extension.