09-23-2010
Help with troubleshooting crontab
Hello all,
When I configured cron jobs that execute bash scripts a while back on my box they worked and the other day I tried to enable cron jobs that execute a bash script to run with no success.
cron text file:
Quote:
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0-59 * * * * date >>/tmp/date.log 2>&1
0-59 * * * * /usr/local/bin/sensor-rpt/test.sh >/dev/null 2>&1
test.sh file
Quote:
#!/usr/bash
#
#PATH=/sbin:/bin:/usr/sbin:/usr/bin
#export PATH
#
ts=`date +%s`
#
#
echo "$ts" >> "/usr/local/bin/sensor-rpt/test.txt
The script has execution rights (e.g. if I use bash /usr/local/bin/sensor-rpt/test.sh) it outputs the timestamp to a file. The first job "date" outputs it's file to the tmp directory and dates are getting appended when executed by crontab.
I also tried adding my user to the crontab group and it still didn't resolve the problem. Any advice would be greatly appreciated.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How can i tell how long my network cards have been connected to the network for. (1 Reply)
Discussion started by: manwithaphone
1 Replies
2. Shell Programming and Scripting
I am fairly new to Unix (Sun OS) scripting with Ksh, and I could use a little help troubleshooting my script. When I run it, I get the error "if unexpected" on the function setYear. If I comment out the setYear function, I get the error "for unexpected" on the function sendEmails. This leads me... (8 Replies)
Discussion started by: mharley
8 Replies
3. UNIX for Dummies Questions & Answers
Hi
I am trying to do a network install of Solaris 10 08_07 onto a Sunfire T2000. I have configured all my network-boot-arguments on the client server (named sundb1). I have installed my image of Solaris on my install server (sun1).
But when I try to install using
# boot net -s
I get the... (0 Replies)
Discussion started by: Bobby76
0 Replies
4. Solaris
Hi.
I have a Solaris 10 server that's taking about 20secs to respond to telnet or ftp commands. Has anyone ever seen something like that? Can you tell me where to start troubleshooting please? I logged in and did a prtstat, but nothing is jumping out as an issue. (8 Replies)
Discussion started by: bbbngowc
8 Replies
5. AIX
Hi guys,
Is there a command in AIX similar to ps, but shows memory usage by application? I'm trying to track down a rogue application that's using up all 32GB of the available systems memory and causing the the system to page to disk. (4 Replies)
Discussion started by: bbbngowc
4 Replies
6. AIX
I am running Oracle databases and recently have been facing slow IO response. I know in 11g one can run calibrate_IO from within DB and it would have given me some data for IO, but DB is 10g. Is there any tool available which can give me max MBPS, max IO requests per second system can handle and... (1 Reply)
Discussion started by: clifford
1 Replies
7. AIX
I have an Equallogic SAN that I connect to from AIX (as well as Windows)
I had configured the connection and created the volumes and filesystems and all was working great.
Then one day, no communication between the SAN and the AIX (I can ping though) Anything I do on the AIX box at this time... (2 Replies)
Discussion started by: oldmanjoe
2 Replies
8. Solaris
selected lines from the output of the "prtdiag -v" command on a T5240 SUN server running Solaris 10.
Are the following known as FRU names and what do they mean?
MB/CMP0/BR0/CH0/D0
MB/CMP0/BR0/CH1/D0
SYS/FANBD0/FM0/F0
SYS/FANBD0/FM0/F1
SYS/MB/CMP0/BR1/CH0/D1 ... (1 Reply)
Discussion started by: snoman1
1 Replies
9. IP Networking
Hello all,
Can somebody please tell what is the best book out there that can help me learn TCP troubleshooting and understaning the TCP options like window scaling, large receive offload? I would like to understand how all the TCP tuning parameters function. Is there a book out there that can... (4 Replies)
Discussion started by: Pouchie1
4 Replies
10. Shell Programming and Scripting
Here is a code snippet using whiptail , it fails to complete giving me long list of options available for whiptail .
That is great, but how do I determine which of the current opinions is wrong?
I did tried inserting comment (#) into options and it just did not work.
Deleting the option... (9 Replies)
Discussion started by: annacreek
9 Replies
LEARN ABOUT DEBIAN
queuedefs
queuedefs(4) File Formats queuedefs(4)
NAME
queuedefs - queue description file for at, batch, and cron
SYNOPSIS
/etc/cron.d/queuedefs
DESCRIPTION
The queuedefs file describes the characteristics of the queues managed by cron(1M). Each non-comment line in this file describes one queue.
The format of the lines are as follows:
q.[njobj][nicen][nwaitw]
The fields in this line are:
q The name of the queue. a is the default queue for jobs started by at(1); b is the default queue for jobs started by batch (see
at(1)); c is the default queue for jobs run from a crontab(1) file.
njob The maximum number of jobs that can be run simultaneously in that queue; if more than njob jobs are ready to run, only the first
njob jobs will be run, and the others will be run as jobs that are currently running terminate. The default value is 100.
nice The nice(1) value to give to all jobs in that queue that are not run with a user ID of super-user. The default value is 2.
nwait The number of seconds to wait before rescheduling a job that was deferred because more than njob jobs were running in that job's
queue, or because the system-wide limit of jobs executing has been reached. The default value is 60.
Lines beginning with # are comments, and are ignored.
EXAMPLES
Example 1: A sample file.
#
#
a.4j1n
b.2j2n90w
This file specifies that the a queue, for at jobs, can have up to 4 jobs running simultaneously; those jobs will be run with a nice value
of 1. As no nwait value was given, if a job cannot be run because too many other jobs are running cron will wait 60 seconds before trying
again to run it.
The b queue, for batch(1) jobs, can have up to 2 jobs running simultaneously; those jobs will be run with a nice(1) value of 2. If a job
cannot be run because too many other jobs are running, cron(1M) will wait 90 seconds before trying again to run it. All other queues can
have up to 100 jobs running simultaneously; they will be run with a nice value of 2, and if a job cannot be run because too many other jobs
are running cron will wait 60 seconds before trying again to run it.
FILES
/etc/cron.d/queuedefs queue description file for at, batch, and cron.
SEE ALSO
at(1), crontab(1), nice(1), cron(1M)
SunOS 5.10 1 Mar 1994 queuedefs(4)