How to specify the frequency for TrakPC

Information

This article details how to specify the run frequency for the TrakPC process.  Frequency is one of the switch options used by TrakPC to enable a structured/scheduled audit.

More Information

If you wish to run TrakPC on a periodic basis, the simplest method is to use the Windows Task Scheduler. Unfortunately, this would require that you setup a task on every asset you wishto audit. For more information about Task Scheduler, please refer to Related Articles below.

However, you can create a TrakPC batch file , with the frequency option, and set it up as a login script (either as part of the Startup folder, or through Active Directory). TrakPC will then run every time the system is started or restarted, but it will only generate a new XML file if the current date meets the frequency criteria you specify.

Background

Using the /f option, you can specify a run frequency of one time, daily, weekly, monthly, quarterly, or yearly. In most cases, you can also specify a particular day within the time period, or you can simply have it run if the specified time period has elapsed since the last run.

If the date of the current XMLfile is older than the frequency specified, then a new file is generated; otherwise TrakPC terminates without generating a new file. This is an excellent way to keep your audit count from growing exponentially.

Options

  • /fo (once) – TrakPC runs one time only. It will only generate a new XML file if an XML file does not already exist.
  • /fd (daily) – Generate/post XML file if there is no existing XML file or if the existing file is not dated Today.
  • /fw (weekly) – Generate/post XML fileif there is no existing XML file or if the existing file is one week old (or more). For example, if today is Tuesday, TrakPC would generate a new XML file if the existing file is dated last Tuesday or earlier.
  • /fm (monthly) – Generate/post XML file if there is no existing XML file or if the existing file is one month old (or more). For example, if the current date is July 15, TrakPC would generate a new XML file if the existing file is dated June 15 or earlier.
  • /fq (quarterly) – Similar to /fm except that it specifies quarterly (3 months) instead of monthly. For example, if you specify /fq and the current XML file date is 2/15, then the next run would beon 5/15 or as soon thereafter as possible.
  • /fy (yearly) – Similar to /fm except that it specifies yearly instead of monthly. For example, if you specify /fy and the current XML file date is 2/15/2020, then the next run would be on 2/15/2021 or as soon thereafter as possible.

Parameter Considerations

The /fw, /fm, /fq, /fy options are subject to "date creep".

For example, suppose you’re using the /fw switch and the current XML file is dated for Tuesday. If for whatever reason TrakPC isn't run on the following Tuesday, The next time TrakPC is started (say, on Wednesday), it notes that the XML file is more than a week old and generates a new file.

The XML file is now dated on a Wednesday, and next week's run will also be on Wednesday; the weekly day of the week has changed from Tuesday to Wednesday. Over time it is possible for an entire week to be skipped if the date "creeps" to Friday and then the machine isn't started on a Friday.

To avoid date creeps, you can specify a particular day or month using advanced options (see below).

Advanced Options

You can used advanced switches to better micromanage your TrakPC schedule.

  • /fw# – When using the weekly switch, you can specify what day of the week you would like to run it on. Replace “#” with the day of the week (Monday = 1, Tuesday = 2, etc…). For example, if you use /fw3, then TrakPC will generate a new XML file each Wednesday, or as soon as possible thereafter. Even if a day is missed and the XML is not generated until Thursday or Friday, it will still run the following Wednesday.
     
  • /fm# – When using the monthly switch, you can specify what day of the month you would like to run it on. Replace “#” with the day of the month. For example, if you use /fm25, then TrakPC will generate a new XML file on the 25thof each month, or as soon as possible thereafter. 

    One special consideration for this switch:  /fm31 will run on the last day of the month if the month has fewer than 31 days.
     
  • /fq# - When using the quarterly switch, you can specify what day of the quarter you would like to run it on. Replace “#” with the day of the quarter. For example, if you use /fq45, then TrakPC will generate a new XML file on the 45thof each quarter, or as soon as possible thereafter. 

    One special consideration for this switch:  /fq92 will run on the last day of the quarter if the quarter has fewer than 92 days.
     
  • /fyMMDD - When using the yearly switch, you can specify what month/day of the year you would like to run it on. Replace “MMDD” with the month and day of the year. For example, if you use /fy0215, then TrakPC will generate a new XML file on February 15th of each year, or as soon as possible thereafter.