Skip to content. | Skip to navigation

You are here: Home Managing Audits Scheduling and Running Audits External to EnergyCAP

Scheduling and Running Audits External to EnergyCAP

Below is a sample command line to use for the EnergyCAP Audit Task applet to audit the bills or to import channel/interval data. This task should be scheduled to run on either the Web server, database server, or an application server to centralize automated tasks, avoid network traffic issues, and provide a quicker audit.

The Audit Task applet command line will execute the audits in a specified Audit Group. Therefore, you will need to create at least one Audit Group in EnergyCAP and the EnergyCAP User indicated in the command line MUST have permission to execute audits. If the system user is the one you want to use, you will need to edit the security user role or the system user to grant permission to execute audits.

The command line to pass to the Audit Task applet is defined below. In the command line, we have the choice of either providing the start date and end date or providing the number of days (prior to the system date) to limit the data being audited. If you are planning to run this as a scheduled task, it is recommended that you use the number of days option. In the example below, the start date and end date option are used. The command line format is as follows:

Audittsk –d [DSN] –u [User] –p [pwd] –s [start date] –e [end date] –c [channel(s)] –a [account(s)] –g [audit group] –l [logfile] –b [batch]

Not all options are required, depending on what type of audit you are running. If you are running billing audits, the account number would be used and not the channel option. If you do not enter dates, channels, or accounts, it will run for all. The required fields are the dsn, user, pwd, start date, end date, audit group and logfile.

Each field in the command line is described below:

  • -d [DSN] is the ODBC Datasource name (demodata)
  • -u [User] is an EnergyCAP Enterprise User (system). Remember, that the user must have rights to run audits or it will not work.
  • -p [pwd] is the password for the EnergyCAP Enterprise User above.
  •  -s [start date] is the date [yyyy-MM-dd] or [number]d to begin auditing data (the number of days is assumed to be negative. To audit the previous 2 days of data, the format should be ‘–s 2d’). The dates used will look at the bill dates or channel dates (not the date it was entered, etc).
  •  -e [end date] is the date [yyyy-MM-dd] or [number]d to stop auditing data (the number of days is assumed to be negative. To end the audit two days previous to the system date, the format should be ‘–e 2d’). If you are running this task overnight, either have the end date 1 day prior to the system date, or do not include this switch in the command line.
  •  -a [account(s)] allows you to specify one or more accounts to audit
  • -g [audit group] defines what audit group to run (TEST1, for example)
  •  -l [log file] is the name and path, in quotes, for a log file to capture error messages (“c:\temp\bjAuditLogs\AuditLog_[DATETIME].log”). The switch is a lower case “l” for log. During testing, we determined that the [DATETIME] above was not being replaced with the system date and time, as it should. This bug has been corrected and will be available with the next release of EnergyCAP Enterprise.
  • -b [batch] This parameter allows you to include the name of the batch that you would like the audits to run against.

Using the above sample data, the command line would be:

Audittsk –d demodata –u system –p system –s 2004-12-06 –e 2004-12-28 –g TEST1 –l “c:\temp\bjAuditLogs\AuditLog_[DATETIME].log”


To run the command line format, open a command window (in Windows, click on the Start button, click on Run, and enter the text: "cmd"), change directories to “c:\Program Files\EnergyCAP Enterprise” (or the EnergyCAP installation directory). Next, type in the above command line changing the flags to fit your installation.


Data that fails the audit will appear in the Workflow Manager. To review the audit results, expand the Channels folder or Bill folder and select the Problems folder. The channels or bills with data that needs to be reviewed will appear on the right side of the screen and explanations of why the data failed the specific audit are provided in the lower window. You may need to select Edit and/or Refresh to display any new problems found by the audits if you are already in the application.

Add comment
(Required)
Tell us your name.
(Required)
(Required)
(Required)
Enter the word