Skip to content

Command Line Interface

The primary way to interact with the FreeTicketing agent is through the command line interface (CLI).

Usage

Basic Commands

powershell
# Check version
FreeTicketing.exe --version

# Run once (not in loop)
FreeTicketing.exe --once

# Update configuration from XBE server
FreeTicketing.exe --update-config

# Execute a SQL query
FreeTicketing.exe --execute-query "SELECT * FROM tickets WHERE status = 'pending'"

# Run cleanup service
FreeTicketing.exe --cleanup
bash
# Check version
./FreeTicketing --version

# Run once (not in loop)
./FreeTicketing --once

# Update configuration from XBE server
./FreeTicketing --update-config

# Execute a SQL query
./FreeTicketing --execute-query "SELECT * FROM tickets WHERE status = 'pending'"

# Run cleanup service
./FreeTicketing --cleanup

Windows Service Commands

powershell
# Install service with default name
FreeTicketing.exe --install

# Install service with custom name
FreeTicketing.exe --install --name "MyFreeTicketing"

# Check service status
FreeTicketing.exe --status

# Start service
FreeTicketing.exe --start

# Stop service
FreeTicketing.exe --stop

# Restart service
FreeTicketing.exe --restart

# Remove service
FreeTicketing.exe --remove

Default Behavior

Run without any options to start the program in a continuous loop. The interval between runs can be configured using the run_interval_minutes field in the config.json file.

Options

OptionDescriptionPlatform
--versionDisplay the application versionAll
--help, -hShow the help message and exitAll
--onceRun the import process onceAll
--update-configUpdate the configuration file from the XBE serverAll
--execute-queryExecute a SQL query and display the resultsAll
--cleanupRun cleanup service to delete old tickets and logsAll
--installInstall the FreeTicketing serviceWindows
--nameCustom name for the service (default: FreeTicketing)Windows
--statusCheck the status of the FreeTicketing serviceWindows
--startStart the FreeTicketing serviceWindows
--stopStop the FreeTicketing serviceWindows
--restartRestart the FreeTicketing serviceWindows
--removeRemove the FreeTicketing serviceWindows

Take control of your e-Ticketing process today!