diff --git a/apps/cron/index.tsx b/apps/cron/index.tsx index abf5322..01292cf 100644 --- a/apps/cron/index.tsx +++ b/apps/cron/index.tsx @@ -572,7 +572,7 @@ app.post('/new', async c => { return c.redirect('/new?error=invalid-name') } - const cronDir = join(APPS_DIR, appName, 'current', 'cron') + const cronDir = join(APPS_DIR, appName, 'cron') const filePath = join(cronDir, `${name}.ts`) // Check if file already exists diff --git a/apps/cron/lib/discovery.ts b/apps/cron/lib/discovery.ts index c540e6a..1c3611a 100644 --- a/apps/cron/lib/discovery.ts +++ b/apps/cron/lib/discovery.ts @@ -13,8 +13,7 @@ export async function getApps(): Promise { for (const entry of entries) { if (!entry.isDirectory()) continue - // Check if it has a current symlink (valid app) - if (existsSync(join(APPS_DIR, entry.name, 'current'))) { + if (existsSync(join(APPS_DIR, entry.name, 'package.json'))) { apps.push(entry.name) } } @@ -35,7 +34,7 @@ export async function discoverCronJobs(): Promise { for (const app of apps) { if (!app.isDirectory()) continue - const cronDir = join(APPS_DIR, app.name, 'current', 'cron') + const cronDir = join(APPS_DIR, app.name, 'cron') if (!existsSync(cronDir)) continue const files = await readdir(cronDir) diff --git a/apps/cron/lib/executor.ts b/apps/cron/lib/executor.ts index 2a8c9f8..9a74a90 100644 --- a/apps/cron/lib/executor.ts +++ b/apps/cron/lib/executor.ts @@ -37,7 +37,7 @@ export async function executeJob(job: CronJob, onUpdate: () => void): Promise