Calling C program from cron results in no output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Calling C program from cron results in no output
# 1  
Old 03-25-2009
Calling C program from cron results in no output

I can call a C program from the shell and results are outputted as normal. The C program processes some files and spits out a .csv file.

If I scheduled it in cron, there is no output.

If their a special way to schedule C programs in cron?

thanks & regards
# 2  
Old 03-26-2009
There should be no difference to a default run, with those exceptions:
  • The run directory is the $HOME of the UID it's running under (eg. if it's running as root the script is started in /root/ in Linux)
  • Any output to stdout/stderr is captured and sent via email, except if email delivery is turned off, then it's discarded
  • Input from the user isn't possible as there's no TTY connected
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Odd results when my script runs from cron..

Hi folks, So I wrote a script to run "top", "awk" out values fro the "top" and send the results to a data file. I then set it to run in cron every 15 minutes. Now I'm noticing that the script, and it's sub-commands are not always cleanly finishing and, in my investigations, I am also... (11 Replies)
Discussion started by: Marc G
11 Replies

2. UNIX for Dummies Questions & Answers

Program output in terminal by invoking in cron

Hi, I have lost a lot of hours by looking for answer but without results.. My problem is that: I use Debian GNU/Linux and I want to configure cron in order to run rtorrent every day between 24.00 and 09.00. That part I have achieved, but I couldn't forced cron to make it visible on any of my... (10 Replies)
Discussion started by: juru_piotr
10 Replies

3. Homework & Coursework Questions

Calling compiled C program with Perl program

Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies

4. Shell Programming and Scripting

Unexpected results when triggered from cron

Following script gives different results when triggered from Cron compared to when triggered from command line. It is not able to assign values to some variables when triggered from cron. Can any one help? Its a very simple script Script - #! /bin/ksh sFile=$1 sEnv=$2 sWaitFile=$3... (1 Reply)
Discussion started by: sumeet
1 Replies

5. Shell Programming and Scripting

usinf STDIN or ARGV, taking the input, calling the library and printing results

Good morning!! I wrote a script and Im not the best at Perl so I would like someone to look it over....just in case. Ive been working on this script forever!! The script is supposed to: Have the user enter a number using STDIN. Calculate the average of the numbers, the total of all of the... (0 Replies)
Discussion started by: bigben1220
0 Replies

6. UNIX for Advanced & Expert Users

calling a Universe program

Can someone offer some technical advice concerning an call to a IBM U2 (Universe) program? When I use the following script from a unix shell, it works fine: $ " xxx.sh " (contains the following --->) 1. cd /links/ACCOUNT1 2. /shapps/ibm/uv/bin/uv "COUNT FILE1" ... (2 Replies)
Discussion started by: smintz
2 Replies

7. UNIX for Advanced & Expert Users

calling program

hi, i have a script.sh on my machine and it used in the system but my question is how can i know the program called this script.sh?? i.e. from where it called and execute?? Many thanks (1 Reply)
Discussion started by: alzuma
1 Replies

8. UNIX for Dummies Questions & Answers

Calling a PHP script from cron

This is a line from my crontab: 12 12 * * * /home/users/ElburdNDL/www/backups/adddate.php The permissions of the script is 755 it should execute ok....but it doesn't. Do I somehow have to give cron the path to PHP or something? If so, how exactly? Thanks. Ed PS Am a total newbie... (10 Replies)
Discussion started by: eludlow
10 Replies

9. Shell Programming and Scripting

java errors when calling from cron

I am more or less new to using cron, and I am trying to automate a log cleaning system I have made. The system basically cleans through WWW logs that are mounted on an NFS and creates text files for entry into a local PostgreSQL DB. For the past year I have been running the various scripts and... (3 Replies)
Discussion started by: mntamago
3 Replies

10. Programming

C program with two results.

I have this program that I execute into UNIX UX and after into UNIX AIX. The program are just below: #include <stdio.h> struct A { double d; char a; }; struct B { char a; double d; }; void main() { struct A Va; struct B Vb; (7 Replies)
Discussion started by: Gandalfcgb
7 Replies
Login or Register to Ask a Question