Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
Defect Fix:

- Duplicate runs of scheduled APIs on certain builds of Windows
  • Loading branch information
SteveGoldthorpe committed Mar 12, 2019
1 parent d2cc222 commit 64027b0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# CHANGELOG

## 1.2.1 (March 12th 2019)

Defect Fix:

- Duplicate runs of scheduled APIs on certain builds of Windows

## 1.2.0 (January 21st, 2019)

Features:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -6,7 +6,7 @@ The utility provides a quick and easy way to schedule the running of Hornbill AP

### Windows

* Download the ZIP archive containing the executables, configuration file and license;
* Download the OS-specific ZIP archive containing the executables, configuration file and license;
* Extract the ZIP archive into a folder you would like the application to run from e.g. 'C:\hornbill_scheduler\'.

## Configuration
Expand Down Expand Up @@ -117,18 +117,18 @@ Command Line Parameters
* dryrun : Defaults to `false`. Set to `true` to run the tool in dryrun mode, which outputs all API call details (service, method and payload) to the log without actually firing the API calls
* debug : Defaults to `false`. Set to `true` to run the tool in debug mode, which outputs the API call request and reponse XML payload to the log file when not in dryrun mode

`goAPIScheduler_w64.exe -file=conf.json -drytun=true`
`goAPIScheduler.exe -file=conf.json -dryrun=true`

When you are ready to start the scheduler:

* Open '''conf.json''' and add in the necessary configration;
* Open Command Line Prompt as Administrator;
* Change Directory to the folder containing the scheduler executables and configuration file 'C:\hornbill_scheduler\';
* Run the command relevant to your OS: goAPIScheduler_w64.exe for 64 bit Windows systems, goAPIScheduler_w32.exe for 32 bit Windows systems
* Run the command relevant to your OS: goAPIScheduler.exe Windows systems
* Follow all on-screen prompts, taking careful note of all prompts and messages provided.

When the scheduler is executed, you will be presented with a list of all active schedule items from the configuration file, and these items will be executed as per the config at the relevant dates/times.

## Exit

To end the scheduler app, press CTRL+C in the Command Prompt window where the scheduler is running.
To end the scheduler app, press CTRL+C in the Command Prompt window where the scheduler is running.
11 changes: 8 additions & 3 deletions main.go
Expand Up @@ -15,8 +15,8 @@ import (

"github.com/go-xmlfmt/xmlfmt"
"github.com/hornbill/color"
"github.com/hornbill/cron"
"github.com/hornbill/goApiLib"
apiLib "github.com/hornbill/goApiLib"
"github.com/robfig/cron"
)

func main() {
Expand All @@ -28,12 +28,17 @@ func main() {
flag.StringVar(&configFileName, "file", "conf.json", "Name of the configuration file to load")
flag.BoolVar(&configDebug, "debug", false, "Set to true to run scheduler in debug mode, where API call request and reponse XML payload will be written to the log")
flag.BoolVar(&configDryRun, "dryrun", false, "Set to true to run scheduler in dryrun mode. No API calls will be made")
flag.BoolVar(&configVersion, "version", false, "Set to true to output the version")
flag.Parse()
if configDryRun {
logEntryType = 6
logger(logEntryType, "RUNNING IN DRYRUN MODE", true)
}

//-- If configVersion just output version number and die
if configVersion {
fmt.Printf("%v \n", version)
return
}
logger(logEntryType, "---- Hornbill API Scheduler V"+fmt.Sprintf("%v", version)+" ----", true)
logger(logEntryType, "Flag - Configuration File: "+configFileName, true)
logger(logEntryType, "Scheduler started at: "+currTime, true)
Expand Down
3 changes: 2 additions & 1 deletion main.structs.go
@@ -1,7 +1,7 @@
package main

const (
version = "1.2.0"
version = "1.2.1"
timeLayout = "2006-01-02T15:04:05.000Z"
cliTimeLayout = "2006/01/02 15:04:05"
)
Expand All @@ -10,6 +10,7 @@ var (
configFileName string
configDebug bool
configDryRun bool
configVersion bool
logEntryType = 3
apiCallConfig apiCallStruct
boolConfLoaded bool
Expand Down

0 comments on commit 64027b0

Please sign in to comment.