RicterZ / BGmi

BGmi is a cli tool for subscribed bangumi.
https://bgmi.ricterz.me
387 stars 72 forks source link

卸载之后创建的定时任务没有被移除 #114

Closed Ilcyb closed 6 years ago

Ilcyb commented 6 years ago

Platform:Windows 10

python version:3.5.3

BGmi version:latest

def install_crontab():
    print_info('Installing crontab job')
    if IS_WINDOWS:
        copy(os.path.join(os.path.dirname(__file__), 'others/cron.vbs'), BGMI_PATH)
        os.system('schtasks /Create /SC HOURLY /TN "bgmi updater" /TR "{}"  /IT /F'.format(
            os.path.join(BGMI_PATH, 'cron.vbs')))
    else:
        path = os.path.join(os.path.dirname(__file__), 'others/crontab.sh')
        os.system("bash '%s'" % path)

这段代码在安装时注册了一个定时命令,但是卸载时没有把这个命令给移除,结果就导致卸载了之后每过一段时间就弹出两个powershell窗口一闪而过。 image

RicterZ commented 6 years ago

@Trim21 这个咋移除啊

trim21 commented 6 years ago

win+q搜索计划任务 找到bgmi update 删除

trim21 commented 6 years ago

好像没办法在用pip卸载的时候自动卸载...一会我补在readme里

trim21 commented 6 years ago

https://github.com/BGmi/BGmi/blob/dev/README.rst#uninstall