01-10-2008
Cron not working
I created a file in /u01/oradata directory as cronjb.ksh which contains following script
30 12 * * * /export/home/oracle/u01/oradata/rman.ksh
'/export/home/oracle' is my root directory. I then moved cronjb.ksh file to my '/export/home/oracle' directory. i typed crontab cronjb.ksh. However my cronjob named cronjb.ksh does not run. I typed mail and i dont see any email. Below is my rman.ksh script. is there any command to findout why my cronjob not working?
[b]exec>/u01/oradata/bkup_$$.log 2>&1
ORACLE_HOME=/u01/app/oracle/product/10.2; export ORACLE_HOME
ORACLE_SID=SEED; export ORACLE_SID
PATH="$PATH:$ORACLE_HOME/bin"
rman target=/<<
EOF
run{
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALLOCATE CHANNEL ch1 device type disk FORMAT
'/u01//oradata/ora/%U';
BACKUP AS COMPRESSED BACKUPSET
DATABASE PLUS ARCHIVELOG;
SQL 'ALTER DATABASE OPEN';}
EXIT ;
EOF[/B
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello All!
I'm having problems with cron. First cron is running as a process when i send the top command and I am logged in as root. I type crontab -e to edit/create my cron job. What I'm trying to do is run a perl script on my server (the script does work, i know because I type perl script.pl... (2 Replies)
Discussion started by: ezekiel61
2 Replies
2. UNIX for Dummies Questions & Answers
Cron does not seem to work with this crontab. Any ideas?
# run-parts
# commands to execute every hour
01 * * * * root run-parts /etc/cron.hourly
# commands to execute every day
02 4 * * * root run-parts /etc/cron.daily
# commands to execute every week
22 4 * * 0 root run-parts... (1 Reply)
Discussion started by: DaleCabell
1 Replies
3. UNIX for Dummies Questions & Answers
Hello I have a mac os x server machine that I have setup a cron to run a php file using wget and cron doesn't seem to work. I have setup cron on other mac's before and they have all worked. Also I know wget works because I have tested it. Is there anything else I should try?
I do crontab -e and... (5 Replies)
Discussion started by: christo16
5 Replies
4. HP-UX
Hi,
I do have three scripts. Whcih inserts records into a table using sqlldr, creating some reprot files etc. The first script will call the second and then the second will call the third. When I run my first script from the shell prompt, all my operation are completed successfully. If I do... (23 Replies)
Discussion started by: risshanth
23 Replies
5. Shell Programming and Scripting
I am using Ubuntu linux desktop, and I am trying to schedule a sheel script to run every 10minutes.
These are the steps I have taken:
crontab -e
added and saved this line to the file
# m h dom mon dow command
*/1 * * * * /home/enzo/Desktop/dlrecentuse
restarted cron:
sudo... (5 Replies)
Discussion started by: daydreamer
5 Replies
6. Solaris
I have a script monitor.sh
the path is /netmon/bin/monitor.sh
when i run this script as
sh /netmon/bin/monitor.sh it runs completely fine.
but when i include it in crontab , it does not run
my cron entry is
0,5,10,15,20,25,30,35,40,45,50,55 * * * *... (11 Replies)
Discussion started by: asalman.qazi
11 Replies
7. Shell Programming and Scripting
Hello,
I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me
1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies
8. Shell Programming and Scripting
Hi all,
I wrote a script as below,
#!/bin/ksh
. /app/home/etc/sudo.profile >/dev/null
java -jar $HOME/abc.jar
The jar file abc.jar is located in the same folder as the script.
When I'm manually running that script the jar file gets executed. However if I set a cron job, it... (5 Replies)
Discussion started by: isaacniu
5 Replies
9. Shell Programming and Scripting
Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered.
The script is as follow:
#!/bin/sh
for file in file_1.txt file_2.txt file_3.txt
do
awk '{ print "0" }' $file > tmp.tmp
mv tmp.tmp $file
done
And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies
10. SuSE
Hi,
It is SLES 10.3 VM. Suddenly cron stopped working on this and I am not able to figure out, where it is failing. It is not running with even root. I gave a simple job of redirection of 'date' command, that also doesn't work. Can somebody help me to fix this ?
vmprdt23:~ # ps -ef | grep -i... (4 Replies)
Discussion started by: solaris_1977
4 Replies
cd(1) General Commands Manual cd(1)
NAME
cd - Changes the current working directory
SYNOPSIS
cd [directory]
Note
The C shell has a built-in version of the cd command. If you are using the C shell, and want to guarantee that you are using the command
described here, you must specify the full path /usr/bin/cd. See the csh(1) reference page for a description of the built-in command.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
cd: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
None
OPERANDS
The pathname (either full or relative) to be used as the new working directory.
If (hyphen) is specified as the directory, the cd command changes your current (working) directory to the directory name saved in
the environment variable OLDPWD.
DESCRIPTION
The cd command moves you from your present directory to another directory. You must have execute (search) permission in the specified
directory.
If you do not specify a directory, cd moves you to your login directory ($HOME in ksh and sh environments, or $home in csh environment).
If the specified directory name is a full pathname, it becomes the current working directory. A full pathname begins with a / (slash) for
the root directory, with a . (dot) for the current working directory, or with a .. (dot dot) for the parent directory. If the directory
name is not a full pathname, cd searches for it relative to one of the paths specified by the $CDPATH shell variable (or $cdpath csh vari-
able). This variable has the same syntax as, and similar semantics to, the $PATH shell variable (or $path csh variable).
EXIT STATUS
The following exit values are returned:
The directory was successfully changed. An error occurred.
EXAMPLES
To change to your home directory, enter: cd To change to a new directory, enter: cd /usr/include
This changes the current working directory to /usr/include. Now file pathnames that do not begin with / or ../ specify files located
in /usr/include. To go down one level of the directory tree, enter: cd sys
If the current working directory is /usr/include and if it contains a subdirectory named sys, then /usr/include/sys becomes the cur-
rent working directory. To go up one level of the directory tree, enter: cd ..
The special filename .. (dot dot) always refers to the directory immediately above the current working directory.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of cd: A colon-separated list of pathnames that refer to directories. If the
directory operand does not begin with a / (slash) character, and the first component is not (dot) or cd command will search for directory
relative to each directory named in the CDPATH variable, in the order listed. The new working directory will be set to the first matching
directory found. An empty string in place of a directory pathname represents the current directory. If CDPATH is not set, it will be
treated as if it were an empty string. The name of the home directory, used when no directory operand is specified. Provides a default
value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default
locale is used. If any of the internationalization variables contain an invalid setting, the utility behaves as if none of the variables
had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines
the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte char-
acters in arguments). Determines the locale for the format and contents of diagnostic messages written to standard error. Determines the
location of message catalogues for the processing of LC_MESSAGES. A pathname of the previous working directory, used by the cd - form of
the command. The cd command sets this variable to your current working directory before changing to a new current directory. A pathname
of the current working directory, set by the cd command after it has changed to that directory.
SEE ALSO
Commands: csh(1), ksh(1), pwd(1), Bourne shell sh(1b), POSIX shell sh(1p)
Functions: chdir(2)
Environment: environ(5)
Standards: standards(5)
cd(1)