Gunbot's AutoConfig feature allows you to define multiple automated jobs, each with its own purpose, schedule, and filters. Sometimes, you might want to temporarily stop a job from running without deleting its entire configuration, or you might be testing a new job and only want to activate it when ready. This is where the enabled
parameter comes into play.
Nearly every option that follows can be set without editing files by hand.
Click the โฎ (three-dots) menu โ AutoConfig, step through the wizard, and press Save; it will write a correct autoconfig.json
for you.
The enabled
Parameter: Simple Job Controlโ
The enabled
parameter is a straightforward yet powerful boolean flag (accepting true
or false
) that you can include in each AutoConfig job's definition within your autoconfig.json
file.
"enabled": true
: The job is active. Gunbot will load this job, and it will execute according to its definedschedule
. This is the default behavior if theenabled
parameter is omitted for a job that Gunbot successfully parses."enabled": false
: The job is inactive or disabled. Gunbot will recognize the job's configuration but will not schedule it or attempt to run it. It's effectively paused.
How to Use the enabled
Parameterโ
You add the enabled
parameter at the top level of a specific job's configuration block.
Consider the following autoconfig.json
snippet with two jobs:
{
"dailyVolumeScanner": {
"enabled": true, // This job is active
"type": "addPairs",
"schedule": "0 1 * * *", // Runs daily at 1 AM
"pairs": {
"exchange": "binance",
"include": "USDT-"
},
// ... other settings for dailyVolumeScanner
},
"experimentalTrendFilter": {
"enabled": false, // This job is currently disabled
"type": "manageOverrides",
"schedule": "*/30 * * * *", // Would run every 30 mins if enabled
"pairs": {
"exchange": "kraken",
"include": "USDT-BTC,USDT-ETH"
},
// ... other settings for experimentalTrendFilter
}
}
In this example:
dailyVolumeScanner
will run as scheduled because"enabled": true
.experimentalTrendFilter
will not run, even though it has a valid schedule and configuration, because"enabled": false
. Its settings are preserved, but Gunbot's AutoConfig module will skip its execution.
To activate the "experimentalTrendFilter" job, you would simply change its enabled
value to true
and then let Gunbot reload the autoconfig.json
file (which it usually does automatically upon changes, or after a restart).
Benefits of Using enabled
โ
- Safe Testing: When creating a new AutoConfig job, you can set
"enabled": false
initially. This allows you to perfect its configuration (filters, overrides, schedule) without any risk of it running prematurely or affecting your live trading setup. Once you're confident, you can switch it totrue
. - Temporary Deactivation: If a particular strategy or automated task is not suitable for current market conditions, or if you want to pause it for maintenance or review, setting
"enabled": false
is a quick way to take it offline without losing its setup. - Preserving Configurations: Instead of deleting a complex job configuration that you might need later, you can simply disable it. This keeps your settings saved and ready for reactivation.
- Conditional or Seasonal Jobs: You might have jobs designed for specific market events (e.g., high volatility periods, weekend trading). You can keep these configured with
"enabled": false
and only switch them totrue
when those conditions arise. - Reducing System Load: If you have many AutoConfig jobs and notice performance issues, you can temporarily disable less critical jobs to free up system resources, helping you identify if a particular job is causing a bottleneck.
- A/B Testing (Manual): While not a fully automated A/B testing system, you could have two similar jobs with slightly different configurations, enabling one and disabling the other to compare their behavior or effectiveness over time.
Reloading Configurationโ
When you change the enabled
status of a job (or any other part of autoconfig.json
), Gunbot needs to reload this configuration file to apply the changes. Gunbot typically watches autoconfig.json
for modifications and reloads it automatically. If you find that changes are not taking effect immediately, a restart of Gunbot will ensure the latest configuration is loaded.
The enabled
parameter is a fundamental tool for managing your suite of AutoConfig jobs. It provides a non-destructive way to control which automations are active, offering flexibility in testing, maintenance, and strategic deployment of your Gunbot's capabilities. Regularly reviewing the enabled
status of your jobs is good practice to ensure only intended automations are running.