Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to submit the job using drqueue's sendjob tool. When doing this from the terminal it works just fine. However, when doing this from cron, I get segmentation fault at libc (2.11.3-4). I tried using strace and I found that when running from cron, it can't open tty. What would the workaround be or maybe there's something else?

share|improve this question
1  
if you run the command as yourcommand </dev/null do you get the same segfault? –  cstamas Nov 24 '12 at 16:02
add comment

2 Answers

You could try running it screen.

From the screen help (-h):

-dmS name     Start as daemon: Screen session in detached mode.

So something like

screen -dmS some_session_name "/path/to/yourstuff_here"
share|improve this answer
add comment

You can also try preceding the command in your crontab with:

bash --login -c <command>

This runs your command in a separate login shell with the same environment variables as a terminal session.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.