You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide bsk daemon install-autostart / bsk daemon uninstall-autostart.
Why
The daemonize-mode error message recommends running the daemon "in a persistent host task". That is the right shape — but creating such a task is not possible from an agent / sandboxed environment, so every user has to invent their own launcher. We ended up writing a VBS launcher and reverse-engineering the constraints; that shouldn't be necessary.
What fails from an agent environment
Approach
Result
Start-Process <bsk> daemon start
daemon may appear, then is killed together with the spawning command (see #268 — fixed in 0.3.1, which we confirm improves this)
schtasks /create /tn ... /sc onlogon
ERROR: Unspecified error
Register-ScheduledTask ...
Unspecified error
What works today (user-side only, found by trial and error)
A silent launcher in the Startup folder. Two non-obvious requirements:
the file must be pure ASCII — VBScript reads ANSI, and a UTF-8 file fails with a misleading unterminated string constant / object required error that points nowhere near the real cause.
' bsk daemon autostart (silent, at logon)Setsh=CreateObject("WScript.Shell")sh.Run"""C:\Users\<user>\.local\bin\bsk.exe"" daemon start --foreground",0,False
This works because explorer.exe spawns it, outside restricted job objects.
Also please document
Idle exit: daemon exceeded idle threshold; exiting idle_secs:600. Note the timer starts after the browser disconnects (with Edge connected we observed >44 min uptime). The practical rule a user needs is: "Edge open ⇒ the daemon should be up" — it is not a start-once-forever service, and after Edge has been closed for ~10 minutes the daemon is gone and must be relaunched.
If autostart is out of scope for now, publishing the recommended launcher snippet and the ASCII caveat in the README would save every user the same rediscovery.
Request
Please provide
bsk daemon install-autostart/bsk daemon uninstall-autostart.Why
The daemonize-mode error message recommends running the daemon "in a persistent host task". That is the right shape — but creating such a task is not possible from an agent / sandboxed environment, so every user has to invent their own launcher. We ended up writing a VBS launcher and reverse-engineering the constraints; that shouldn't be necessary.
What fails from an agent environment
Start-Process <bsk> daemon startschtasks /create /tn ... /sc onlogonERROR: Unspecified errorRegister-ScheduledTask ...Unspecified errorWhat works today (user-side only, found by trial and error)
A silent launcher in the Startup folder. Two non-obvious requirements:
--foreground(the default daemonize mode fails on this host — see Windows: bsk daemon start auto-detached process exits immediately, extension cannot connect #218),unterminated string constant/object requirederror that points nowhere near the real cause.This works because explorer.exe spawns it, outside restricted job objects.
Also please document
daemon exceeded idle threshold; exiting idle_secs:600. Note the timer starts after the browser disconnects (with Edge connected we observed >44 min uptime). The practical rule a user needs is: "Edge open ⇒ the daemon should be up" — it is not a start-once-forever service, and after Edge has been closed for ~10 minutes the daemon is gone and must be relaunched.中文摘要
请提供
bsk daemon install-autostart。报错里推荐的"persistent host task"在 agent/沙箱环境里建不了(schtasks、Register-ScheduledTask均报Unspecified error),只能由用户在启动文件夹放 VBS(必须--foreground,且必须纯 ASCII,否则报"未结束的字符串常量"这种指不到真因的错误)。另外请把空闲 10 分钟自动退出写进文档——计时是从"浏览器断开"之后开始的,用户需要知道"Edge 开着,daemon 就该在",它不是一次性常驻服务。