-
Overview
每次关机重启之后,
wsl里面的cron服务是关闭的,如果忘记开启,就会导致定时任务失败。首先要明确跟随谁启动:
wsl里的cron服务跟随wsl自启动wsl里的cron服务跟随Window10自启动
-
Starting Linux Background Services on Windows Login
WSL now have supports for background tasks when all your Linux console windows are closed. However, you still needed to start those services yourself because Linux sessions could only be initiated explicitly. There was no start-up config to launch services.
Here is how you can start WSL background services on Windows login:
First, you’ll need a startup script
# create a file named start_cron.sh
(20210128已解决)WSL2开机启动cron
最新推荐文章于 2025-10-10 09:37:12 发布

最低0.47元/天 解锁文章
1210





