Four useful commands
Terminal
wasteless schedule
wasteless status
wasteless collect
wasteless unschedule| Command | Purpose |
|---|---|
schedule | Install or reinstall periodic collection |
status | Show UI and scheduler state |
collect | Run a collection immediately |
unschedule | Remove the system schedule |
What a collection runs
| Stages | Operations | Dependency |
|---|---|---|
| 1 to 6 | CloudWatch, underused EC2, stopped EC2, EBS, EIP, snapshots | boto3 and PostgreSQL |
| 7 to 10 | Load balancer, NAT Gateway, VPC, gp2 to gp3 | Steampipe |
An atomic lock prevents overlapping collections. If Steampipe is missing, the last four stages are skipped with a warning and collection_runs records a partial run.
A scheduler for each platform
| Platform | Mechanism | Keep in mind |
|---|---|---|
| macOS | launchd LaunchAgent | Loads and follows the configured interval |
| Linux with systemd | User timer | enable-linger runs without an SSH session |
| Linux or WSL without systemd | crontab | The environment must remain active |
Three jobs depend on FastAPI
| Job | Purpose |
|---|---|
sync_aws_job | Synchronize resource state and mark some recommendations obsolete |
grace_executor_job | Execute scheduled actions whose delay has elapsed |
terraform_pr_sync_job | Track opened Terraform pull requests |
These APScheduler jobs are separate from the system schedule. They run only while FastAPI is active.
Inspect every run
Logs
wasteless logs
tail -100 ~/.wasteless.log
grep -i error ~/.wasteless.log | tail -20PostgreSQL
SELECT ran_at, full_run, skipped_steps
FROM collection_runs
ORDER BY ran_at DESC
LIMIT 10;Set frequency with COLLECT_INTERVAL_SEC in wasteless.sh, then rerun wasteless schedule.