fix: use getDataDir() for CronService storage path (#139)

Fix path mismatch between CLI and CronService that caused cron jobs
created via CLI to never be picked up by the running service.

- CLI uses getDataDir() for cron-jobs.json
- CronService was overriding with workingDir path
- Now both use getDataDir() (defaults to cwd or Railway volume)

Fixes #135

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Cameron <cpfiffer@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2026-02-04 15:10:13 -08:00
committed by GitHub
parent 3e48036db4
commit e4219d0615

View File

@@ -451,11 +451,10 @@ async function main() {
}
// Start cron service if enabled
// Note: CronService uses getDataDir() for cron-jobs.json to match the CLI
let cronService: CronService | null = null;
if (config.cronEnabled) {
cronService = new CronService(bot, {
storePath: `${config.workingDir}/cron-jobs.json`,
});
cronService = new CronService(bot);
await cronService.start();
}