10-13-2005
problem with a script and the cron
hello
I use a script to give me the number of users, at each hour.
this script read a file where there is the number of users for each hour and for each month (so 12 files per year).
If i execute the script (root), it is ok, i have xxx users for each hour.
if I put the script in the cron (crontab -e), and kill the cron, the planification is right, the script is executed, but I have "0" user as result for each hour !
I have verified the file's permissions, and chmod 777 for each file, but it's same !!!
can you help me ?
thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've written a csh shell script to number each line of a file.
Firstly, the program count the number of the file and create a file with number at the front. Then, combine the file together.
when i call the program manually, it works.However, when i set it in the cronjob, the output always leaves... (3 Replies)
Discussion started by: fung_donald
3 Replies
2. Shell Programming and Scripting
Hello All,
One of my shell scripts was working fine till a few days back. It was scheduled in the cron. But yesterday i made some modifications to the script. The script works fine when i run it from the prompt. But it is not working when in runs from cron. Can someone help me out from this. (4 Replies)
Discussion started by: Raiden
4 Replies
3. Shell Programming and Scripting
Hi!
I just write a simple script to kill-restart a process, but when I use CRON to run it, it runs fine for about 1 minute (kill the process and restart it)... then the new process just dissapears!. 5 minutes later (cron prog time) and it does again... up process the disspaear ...
This is the... (0 Replies)
Discussion started by: Sorrento
0 Replies
4. Shell Programming and Scripting
Hi;
I'm facing the problem with my script like below
30 0 * * * /data/SCRIPT/LOADLOGS/loadata1.sh 2 1 >> /tmp/loaddata.txt
loadata1.sh calling a another 2 scripts which we need to exe in sequence.
when it perform by cron jon, sometimes it just can process 20 recs or less or nothing but... (6 Replies)
Discussion started by: izai
6 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I have problem in executing a shell script. When the shell script is executed at the shell prompt the script works successfully but when the same script is run as a cron job it fails to execute the files called within the shell script.
I have scheduled the job in my crontab file as
... (6 Replies)
Discussion started by: forumthreads
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Before I start, I would like to inform that, I went through all FAQs and other threads before posting here.
I 'm trying to schedule a shell script on cygwin using cron. No matter what I do I don't seem to get the cron job executing my bash script.
My script is temp.sh
echo `date` >... (4 Replies)
Discussion started by: shash
4 Replies
7. Shell Programming and Scripting
Hi,
I have a shell script as below:
ORACLE_HOME=/usr/local/opt/oracle/product/dev
export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin:/usr/bin
export PATH
OUTFILE=/export/home/`basename $0`.out
export OUTFILE
export IDEN
df -k . | tail -1 | read a b c d e f
echo $a >> $OUTFILE
echo $b... (4 Replies)
Discussion started by: Abhinav Pandey
4 Replies
8. UNIX for Dummies Questions & Answers
Hi Newbie here
I am having problems with automating sFTP transfers.
Just to save time - SCP is not an option as sFTP is stipulated by controllers of far end server.
Ineed to automate sFTP transfer of a single file, once a day to a remote server to which i have no control over.
I am using:... (6 Replies)
Discussion started by: robbien
6 Replies
9. Shell Programming and Scripting
When i am working with cron i given the command as crontab - e | grep runjob.sh.I though my command is wrong and i closed it by ctrl+D.After that when i need to open the cron with crontab -e its not opening its giving some number 22667 and when i given crontab -l its working fine i can see all... (5 Replies)
Discussion started by: bhas85
5 Replies
10. UNIX for Dummies Questions & Answers
Hello gurus,
I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired
report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup
is shown below:
#!/bin/ksh
db2... (3 Replies)
Discussion started by: okonita
3 Replies
LEARN ABOUT DEBIAN
bb-snapshot.cgi
BB-SNAPSHOT.CGI(1) General Commands Manual BB-SNAPSHOT.CGI(1)
NAME
bb-snapshot.cgi - CGI program to rebuild the Xymon webpages for a specific point in time.
SYNOPSIS
bb-snapshot.cgi
DESCRIPTION
bb-snapshot.cgi is invoked as a CGI script via the bb-snapshot.sh CGI wrapper. It rebuilds the Xymon web pages to the look they had at a
particular point in time, based upon the historical information logged about events.
bb-snapshot.cgi is passed a QUERY_STRING environment variable with the following parameters:
mon (Start month of the snapshot)
day (Start day-of-month of the snapshot)
yr (Start year of the snapshot)
hour (Start hour of the snapshot)
min (Start minute of the snapshot)
sec (Start second of the snapshot)
The "month" parameters must be specified as the three-letter english month name abbreviation: Jan, Feb, Mar ...
"day" must be in the range 1..31; "yr" must be specified including century (e.g. "2003"). "hour" must be specified using a 24-hour clock.
All of the processing involved in generating the report is done by invoking bbgen(1) with the proper "--snapshot" option.
OPTIONS
--env=FILENAME
Load environment from FILENAME before executing the CGI.
bbgen-options
All options except "--env" are passed on to the bbgen(1) program building the snapshot files.
ENVIRONMENT VARIABLES
BBGENSNAPOPTS
bbgen options passed by default to the bb-snapshot.cgi script. This happens in the bb-snapshot.sh CGI wrapper script.
BBHOME Home directory of the Xymon server files
BBSNAP Directory where generated snapshots are stored. This directory must be writable by the userid executing the CGI script, typically
"www", "apache" or "nobody". Default: $BBHOME/www/snap/
BBSNAPURL
The URL prefix to use when accessing the reports via a browser. Default: $BBWEB/snap
SEE ALSO
bbgen(1), bb-hosts(5), hobbitserver.cfg(5)
Xymon Version 4.2.3: 4 Feb 2009 BB-SNAPSHOT.CGI(1)