04-16-2008
Try adding a path to make sure you are getting the same date command at the prompt and in the script.
Your question is rather unreadable without code tags. You also seem to be missing the backticks. I assume this is not the problem really.
10 More Discussions You Might Find Interesting
1. AIX
Hi All,
I want to run a cron job to run on the first saturday of each month at 1:30am. Would the following entry suffice this condition
30 1 6 * 6 wall %Will this work%
Appreciate your time. (1 Reply)
Discussion started by: rramanuj
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Where can we find Cron job logs?i have a cron job which is not executing at all,
00 12 * * * /xx/yy/job > /pp/qq/log
if i execute the job alone,it is executing fine.
>/xx/yy/job > /pp/qq/log (is executing fine)
but its not executing when it triggered from cron.is there any place cron... (7 Replies)
Discussion started by: rujus
7 Replies
3. Shell Programming and Scripting
Hi,
I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to the command line window
$./dbProcess.sh stop
#### Run Details ######
Hostname : server-hop-1... (4 Replies)
Discussion started by: rajan_san
4 Replies
4. Shell Programming and Scripting
Hi folks,
I have got the following cron entry ...
08 30 * * * /mp1/scripts/test.sh > /mp1/scripts/test_logs.txt 2>&1
The problem is that instead of generating a new test_logs.txt file every time it keeps on appending the outputs to the test_logs.txt file. What is it that I am doing wrong... (2 Replies)
Discussion started by: King Nothing
2 Replies
5. Solaris
Hello All,
Anybody please help me to know ,what happens when a user having entry in both cron.allow and cron.deny files.Wheather the user will be able to access the crontab???
Thanks in advance
Vaisakh (5 Replies)
Discussion started by: ksvaisakh
5 Replies
6. UNIX for Dummies Questions & Answers
Can someone please quickly respond to this?
I need to have a script test.sh to run every 30 minutes from Monday to Saturday from 6am to 10pm as a crontab entry...
Thanks. (3 Replies)
Discussion started by: everurs789
3 Replies
7. Shell Programming and Scripting
In my cron thare is a line like
24 11 * * * /usr/batch/bin/abc.sh > /usr/batch/log/abc.log 2>&1
along with other entries. I want to comment out this line through a shell script. My local variable 'line'ontains the full entry (i.e. 24 11 * * * /usr/batch/bin/abc.sh > /usr/batch/log/abc.log... (4 Replies)
Discussion started by: Soham
4 Replies
8. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
2. Relevant commands, code, scripts, algorithms:
#! /bin/ksh
v="ORG_ID"
... (2 Replies)
Discussion started by: sujitdas2104
2 Replies
9. Shell Programming and Scripting
Hi,
I want to monitor a log file using tail -f command and search for a specific string on the most recent entry from the file. If the search string matches with the most recent or last line from the file, I want send an email to the people with the message.
tail -f service.log|tail -n 1
... (5 Replies)
Discussion started by: svajhala
5 Replies
10. Solaris
Hi
I have a system running solaris 11, in which I am able to execute a script from the command line, but once I put i the crontab does run, but do not give results.
The entry is:
15 11 * * * /var/oswbb/./startOSWbb.sh >> myjob.log 2>&1
30 11 * * * /var/oswbb/./stopOSWbb.sh
I have check... (2 Replies)
Discussion started by: fretagi
2 Replies
LEARN ABOUT CENTOS
crontabs
CRONTABS(4) Crontabs users' Manual CRONTABS(4)
NAME
crontabs - configuration and scripts for running periodical jobs
SYNOPSIS
run-parts [--list|--test]<directory>
DESCRIPTION
Crontabs is a historical name for the run-parts script and the system crontab. The run-parts script runs all executables in the specified
directory. Run-parts runs all executables in the specified directory. The execution of files can be allowed or denied by creating file
jobs.allow or jobs.deny which worked similar as other allow/deny config files. The file must be created in the specified directory.
--list print names of all files (not limited to executables), but don't run them. This option can't be used with test option.
--test print names of files, which would be run.
Randomization of jobs can be configured in the /etc/sysconfig/run-parts file. To enable randomization of jobs, set the RANDOMIZE
parameter to 1 and set the RANDOM parameter to an integer which determines a random seed. Additionally, you may configure the RAN-
DOMTIME parameter (again, by specifying an integer) to provide an additional level of randomization. Jobs are not randomized when
the RANDOM and RANDOMTIME parameters are set to 0. Values in these two parameters must be set to 1 or larger to provide a good
enough randomization.
Randomization of cron jobs can be useful for shared networks, where multiple cron jobs executed at once can cause spikes in traffic,
especially during daily jobs. With randomized jobs, the workload is evenly distributed throughout the day.
EXAMPLE OF CONFIGURATION FILE
RANDOMIZE=1
RANDOM=4
RANDOMTIME=8
Historically the crontab file contained configuration which called run-parts on files in cron.{daily,weekly,monthly} directories. These
jobs are now run indirectly through anacron to prevent conflicts between cron and anacron. That means the anacron package has to be
installed if the jobs in these directories should be running. Refer to the anacron(8) how to limit the time of day of the job execution.
EXAMPLE
/etc/cron.daily/jobs.deny could contain for example 0logwatch which forbid execution of this script.
SEE ALSO
anacron(8), crontab(5)
Marcela Malaova 2012-08-29 CRONTABS(4)