johnlindquist / kit

Script Kit. Automate Anything.
https://scriptkit.com
MIT License
3.91k stars 138 forks source link

Scheduled scripts in cloned kenvs aren't scheduled #1255

Open shyagamzo opened 1 year ago

shyagamzo commented 1 year ago

Layout I have a shared kenv cloned into my .kenv/kenvs/shared folder, which holds a couple of scheduled scripts.

Current Behavior Scheduled scripts in that secondary kenv aren't scheduled and don't run automatically. They also don't appear under Kit -> View Scheduled Scripts in the UI.

They are however, accessible through the UI, and it's possible to run them manually.

Expected Behavior When cloning a kenv, Script Kit should immediately analyze it, build its scripts, and initialize watches and schedules.

Current workaround Create a scheduled script under my main .kenv/scripts folder which runs the original shared script.

// Name: (Delegator) My Shared Script Name
// Schedule: 0,30 */2 * * *

import '@johnlindquist/kit';

run(kenvPath('kenvs', 'shared', 'scripts', 'shared-script-name'));