cron @reboot 什么也不做

cron @reboot 什么也不做

正在运行Mint 18.1 Serena,但我正在ssh进入盒子而不是使用 GUI。我已经尝试了一切。这是我的 cron 条目:

@reboot sleep 60;/bin/sh /home/test/Applications/scripts/startup.sh

这是在用户testcrontab -l.

文件夹权限:

File: 'scripts/'
Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 821h/2081d      Inode: 58843171    Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/    test)   Gid: ( 1000/    test)
Access: 2017-03-31 16:32:42.771206606 -0700
Modify: 2017-03-31 16:31:19.322038792 -0700
Change: 2017-03-31 16:31:19.322038792 -0700
Birth: -

startup.sh权限:

File: 'startup.sh'
Size: 432             Blocks: 8          IO Block: 4096   regular file
Device: 821h/2081d      Inode: 58726626    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: ( 1000/    test)   Gid: ( 1000/    test)
Access: 2017-03-31 16:32:25.178476590 -0700
Modify: 2017-03-31 16:31:19.306039143 -0700
Change: 2017-03-31 16:31:19.306039143 -0700
Birth: -

以及以下内容startup.sh

#!/bin/sh
kill $(cat /home/test/Applications/test1/pycpoint.pid)
cd /home/test/Applications/test1
sh test1 
cd ~

screen -d -m test2 runserver 192.168.86.110:8008

不确定我做错了什么或者为什么这不起作用。还尝试将其添加到并以这种方式init.d/创建和尝试。startup.service从来没有骰子。如果我从命令行执行脚本,它就会起作用。

cron报道来自grep cron /var/log/syslog

Mar 31 17:51:16 htpc systemd[1]: Started Run anacron jobs.
Mar 31 17:51:16 htpc anacron[889]: Anacron 2.3 started on 2017-03-31
Mar 31 17:51:16 htpc anacron[889]: Normal exit (0 jobs run)
Mar 31 17:51:16 htpc cron[909]: (CRON) INFO (pidfile fd = 3)
Mar 31 17:51:16 htpc cron[909]: (CRON) INFO (Running @reboot jobs)

帮助?

相关内容