05-07-2007
recurring run of sh script in crontab
Hello gurus.
I have a problem: my crontab -e is looks like this:
ORACLE_SID=bla-bla
* 21 * * * (sqlplus hotback/hotback @/oracle/backups/bla-bla/scripts/hotback/daily_hotback.sql)
0 19 * * * /oracle/backups/dev10g/scripts/exports/daily_exports.sh
0 1 * * * /oracle/backups/dev10g/scripts/exports/export_compress.sh
All was great untill May 4, when this script began to run every minute during the hour (21:00). Here is a log from /var/log/cron:
May 4 21:00:01 localhost crond[7267]: (oracle) CMD ((sqlplus hotback/hotback @/oracle/backups/bla-bla/scripts/hotback/daily_hotback.sql))
May 4 21:01:01 localhost crond[7278]: (oracle) CMD ((sqlplus hotback/hotback @/oracle/backups/bla-bla/scripts/hotback/daily_hotback.sql))
May 4 21:01:01 localhost crond[7280]: (root) CMD (run-parts /etc/cron.hourly)
May 4 21:02:01 localhost crond[7284]: (oracle) CMD ((sqlplus hotback/hotback @/oracle/backups/bla-bla/scripts/hotback/daily_hotback.sql))
May 4 21:03:01 localhost crond[7291]: (oracle) CMD ((sqlplus hotback/hotback @/oracle/backups/bla-bla/scripts/hotback/daily_hotback.sql))
and so on, all the way during the 9PM and at 22:00 it stops.
I'm a newbie in Unix and really don't understand, why this happens.
BTW, we have 4 boxes with the same job in cron, all of them look like:
0 21 * * * (sqlplus hotback/hotback @/bla-bla/hotback/daily_hotback.sql) (I mean, the first is "0" instead of * (asterics). Could it be the reason?)
As you may be see, this script makes hot backups from datafiles on DBs, and due to this recurring scripts, we have 60 processes, that try to make bakup. At the end, a system hungs, and hotbackups are not finished.
If you have any ideas, please, help me! I would really appreciate that!
Thank you forehand,
M.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have written a "simple" shell-script (BASH) to monitor the logs of our Resin-applicationserver. Whenever Resin runs out of available heap-space, the script then tries to restart the Resin-server.
My problem is that my "autopilot"-script fails when it's run from crontab.
Here's what the... (5 Replies)
Discussion started by: indo1144
5 Replies
2. Shell Programming and Scripting
Hi Folks,
Could you please suggest me how to run a shell script on a solaris env without using crontab. I am actually trying to write a shell script which will grep "WORD" in the logfile andd sends a email.Thanks in advance.
Thanks
Sandeep. (3 Replies)
Discussion started by: sandeep anand
3 Replies
3. Shell Programming and Scripting
I am using Solaris 9. I wish to run my script every 1 minute inteval. Though i can run it using below entry in crontab.
* * * * /export/home/username/script/file_exist_&_run.sh
in short above script will check whether a specific file exist in a directory. If it found it will inovke another... (10 Replies)
Discussion started by: thepurple
10 Replies
4. Shell Programming and Scripting
Hi
I am a novice Linux/Perl user and am struggling to overcome what I am sure is a simple problem.
I am using a perl program to create a shell script daily containing between 10 and 30 "at -f" commands for the same day. Then I change the file attributes to allow the file to be executed. When... (2 Replies)
Discussion started by: simoncjones
2 Replies
5. Shell Programming and Scripting
OS is Ubuntu 8.04.3. When I run the command:
/usr/bin/syslogMailer < /etc/syslog.pipes/criticalMessagesFrom a bash shell it works and i receive an email as per the script however when run from crontab it does not work. Can anyone explain why and how to fix it?
/usr/bin/syslogMailer... (4 Replies)
Discussion started by: jelloir
4 Replies
6. Solaris
What should be the crontab entry in solaris to run a script on 1st of every month?
Is this correct?
00 02 1 * * <script to be executed> (5 Replies)
Discussion started by: deepaksahni0109
5 Replies
7. Shell Programming and Scripting
hi i have a script called test.sh. the content is ls >> crontest.txt.
if i run manually it's giving output.but if i scheduled in crontab it's not giving output.
crontab entry:
02 * * * * /sms5/SMSHOME/eds_sh/test.sh >> /sms5/SMSHOME/eds_sh/testfile/logfile 2>&1
I am using ksh.is there... (2 Replies)
Discussion started by: muraliinfy04
2 Replies
8. Shell Programming and Scripting
#!/bin/bash
#
# RAP configuration script
#
# Usage: ./rap.sh
#
# Requires: expect, tcl
#
# Script expects to find a file called rap.csv located in the same directory as the script. If the file is placed
# in a different directory, modify the custom entries section to specify the absolute... (8 Replies)
Discussion started by: mrkool
8 Replies
9. Shell Programming and Scripting
Hello all,
I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly.
My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies
10. Shell Programming and Scripting
Hello
I have a problem with the crontab command
when I run a code containing Curl on the command line it runs without fail but as soon as I program it with crontab it executes everything except the curl returns fail
thank you for helping me to resolve this problem because since Monday I look... (14 Replies)
Discussion started by: beautymind
14 Replies
LEARN ABOUT DEBIAN
config::model::backend::yaml
Config::Model::Backend::Yaml(3pm) User Contributed Perl Documentation Config::Model::Backend::Yaml(3pm)
NAME
Config::Model::Backend::Yaml - Read and write config as a YAML data structure
VERSION
version 2.021
SYNOPSIS
use Config::Model ;
use Log::Log4perl qw(:easy) ;
use Data::Dumper ;
Log::Log4perl->easy_init($WARN);
# define configuration tree object
my $model = Config::Model->new ;
$model ->create_config_class (
name => "MyClass",
element => [
[qw/foo bar/] => {
type => 'leaf',
value_type => 'string'
},
baz => {
type => 'hash',
index_type => 'string' ,
cargo => {
type => 'leaf',
value_type => 'string',
},
},
],
read_config => [
{ backend => 'yaml' ,
config_dir => '/tmp',
file => 'foo.yml',
auto_create => 1,
}
],
) ;
my $inst = $model->instance(root_class_name => 'MyClass' );
my $root = $inst->config_root ;
my $step = 'foo=yada bar="bla bla" baz:en=hello
baz:fr=bonjour baz:hr="dobar dan"';
$root->load( step => $step ) ;
$inst->write_back ;
Now, "/tmp/foo.yml" contains:
---
bar: bla bla
baz:
en: hello
fr: bonjour
hr: dobar dan
foo: yada
DESCRIPTION
This module is used directly by Config::Model to read or write the content of a configuration tree written with YAML syntax in
"Config::Model" configuration tree.
Note that undefined values are skipped for list element. I.e. if a list element contains "('a',undef,'b')", the data structure will contain
'a','b'.
CONSTRUCTOR
new ( node => $node_obj, name => 'yaml' ) ;
Inherited from Config::Model::Backend::Any. The constructor will be called by Config::Model::AutoRead.
read ( io_handle => ... )
Of all parameters passed to this read call-back, only "io_handle" is used. This parameter must be IO::File object already opened for read.
It can also be undef. In this case, "read()" will return 0.
When a file is read, "read()" will return 1.
write ( io_handle => ... )
Of all parameters passed to this write call-back, only "io_handle" is used. This parameter must be IO::File object already opened for
write.
"write()" will return 1.
AUTHOR
Dominique Dumont, (ddumont at cpan dot org)
SEE ALSO
Config::Model, Config::Model::AutoRead, Config::Model::Backend::Any,
perl v5.14.2 2012-11-09 Config::Model::Backend::Yaml(3pm)