LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-04-2016, 09:43 AM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Rep: Reputation: Disabled
Why nohup sslocal can't be write in crontab?


The `nohub sslocal` command can be executed on console:

nohup sslocal -c /etc/shadowsocks.json > /dev/null 2>&1 &
ps ax |grep sslocal
2194 pts/3 S 0:00 /usr/bin/python3 /usr/local/bin/sslocal -c /etc/shadowsocks.json

Why `nohub sslocal` command can't be executed when to write in crontab?

crontab -e
@reboot nohup sslocal -c /etc/shadowsocks.json > /dev/null 2>&1 &

No sslocal processe when to reboot.
 
Old 07-04-2016, 09:52 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Specify /the/full/path/to nohup and sslocal in the cron entries as jobs executed in cron do not usually get the PATH
 
Old 07-05-2016, 12:28 AM   #3
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
@reboot /usr/bin/nohup /usr/local/bin/sslocal -c /etc/shadowsocks.json > /dev/null 2>&1 &
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Best Way to Write Crontab paperbagperson Linux - Newbie 5 05-12-2016 12:13 PM
[SOLVED] Need help to write script for crontab Hdd operation kapz Slackware 7 01-05-2011 07:42 AM
how to write crontab for cpp program so that it accepts input interactively srinivas445 Linux - Newbie 1 10-15-2008 01:09 PM
How to write crontab to check file size and all file in a directory? modpriest Linux - Newbie 1 02-14-2008 06:48 AM
problem with nohup command and nohup file size vbseeker Linux - General 1 09-17-2006 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration