apps: add crontab

crontab is a text field, so we can have comments

part of #793
This commit is contained in:
Girish Ramakrishnan
2021-09-27 14:21:42 -07:00
parent 04ff8dab1b
commit b86d5ea0ea
6 changed files with 89 additions and 5 deletions
+2 -2
View File
@@ -112,7 +112,7 @@ async function sync() {
const allApps = await apps.list();
const allAppIds = allApps.map(function (app) { return app.id; });
const allAppIds = allApps.map(app => app.id);
const removedAppIds = _.difference(Object.keys(gState), allAppIds);
if (removedAppIds.length !== 0) debug(`sync: stopping jobs of removed apps ${JSON.stringify(removedAppIds)}`);
@@ -126,7 +126,7 @@ async function sync() {
for (const app of allApps) {
const appState = gState[app.id] || null;
const schedulerConfig = app.manifest.addons ? app.manifest.addons.scheduler : null;
const schedulerConfig = apps.getSchedulerConfig(app);
if (!appState && !schedulerConfig) continue; // nothing to do
if (appState && appState.cronJobs) { // we had created jobs for this app previously