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?
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"
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.
yourcommand </dev/null
do you get the same segfault?