Troubleshooting Guide
⚠️ Note: This troubleshooting guide is a placeholder for the upcoming comprehensive guide that will be available in future releases. For the MVP release, we've included some basic troubleshooting tips below.
Basic Troubleshooting
Installation Issues
If you encounter issues during installation:
-
Make sure you have Go 1.21 or higher installed
go version
```text -
Check that your GOPATH is correctly configured
go env GOPATH
```text -
Try reinstalling from source
git clone https://github.com/rshade/cronai.git
cd cronai
go build -o cronai ./cmd/cronai
```text
Configuration Problems
If your configuration file is not working:
-
Validate your configuration format
timestamp model prompt response_processor [variables] [model_params:...]
```text -
Use the validate command to check your configuration
cronai validate --config /path/to/cronai.config
```text -
Check that your cron schedule format is valid
# Standard cron format: minute hour day-of-month month day-of-week
# Example: 0 9 * * 1 (run at 9 AM every Monday)
```text
API Keys
If you're having issues with model execution:
-
Check that you have set the required API keys in your environment
# For OpenAI
export OPENAI_API_KEY=your_openai_key
# For Claude
export ANTHROPIC_API_KEY=your_anthropic_key
# For Gemini
export GOOGLE_API_KEY=your_google_key
```text -
Verify that your API keys are valid and have the required permissions
-
For GitHub processors, ensure your GITHUB_TOKEN is set and has appropriate permissions
export GITHUB_TOKEN=your_github_token
```text
Prompt Issues
If your prompts are not working as expected:
-
Check that your prompt file exists in the cron_prompts directory
ls -la cron_prompts/your_prompt.md
```text -
Make sure your variable placeholders are correctly formatted
{{variable_name}}
```text -
Preview your prompt with variables to see how it will be rendered
cronai prompt preview your_prompt --vars "var1=value1,var2=value2"
```text
Running as a Service
If you're having issues with the systemd service:
-
Check the service status
sudo systemctl status cronai
```text -
View the logs for error messages
sudo journalctl -u cronai -f
```text -
Verify that your environment file is correctly configured
cat /etc/cronai/.env
```text
Logging
CronAI includes basic logging capabilities in the MVP. Logs can help identify issues:
# Set more verbose logging
export LOG_LEVEL=debug
# Run with verbose output
cronai start --config /path/to/config
```text
## Getting More Help
For the MVP release, if you encounter issues not covered in this guide:
1. Check the GitHub repository for known issues: <https://github.com/rshade/cronai/issues>
2. File a new issue with detailed information about your problem
A comprehensive troubleshooting guide with detailed error handling, diagnostics, and solutions will be available in future releases.