HI,
I have a strange problem. A shell script that runs fine on solaris. when i ported to linux, it started hanging.
here is the core of the script
CFG_FILE=tab25.cfg
sort -t "!" -k 2 ${CFG_FILE} | egrep -v "^#|^$" | while IFS="!" read a b c
do
#echo "jobs output"
#jobs
#echo "jobs... (13 Replies)
Hello,
I am working one one script where I am using the below code which is using to connect with MKS client when I run my script manually it works effiecently i.e. it connects with MKS client but when I run it from CRON it doesn't connect.
1)Can some one tell when it is running from cron... (1 Reply)
Hi all
I have this inside a shell script (bash):
cd DIRECTORY
find . -maxdepth 1 | sed 's#./##' | /usr/bin/xargs -I '{}' chown -Rv '{}' /DIRECTORY/'{}'
All the directories in this location are named after usernames, so it simply sets the owner to that of the username of the folder.
It... (5 Replies)
Hello all,
I'm new here and have a question if you don't mind helping me. I have a script that will work if I kick if off manually but not from Cron. My cron entry is this:
05,20,35,50 * * * * /scripts/status.sh > /dev/null 2>&1
The first script (works fine) is this:
#!/bin/sh
#
#... (14 Replies)
Hello Every one,
I have a shell script which is running fine manually, but its giving me hard time when running tru cron job. :wall:.
Am using #!/usr/bin/ksh
>echo $SHELL
/usr/bin/ksh
Cron Job is as below, it execues but dosent do what i want it to do.
47 15 * * *... (1 Reply)
Hello Guys,
I have scratched my head alot on this but couldn't find clue what's wrong. Can you please help me with this? My problem is as following.
1) When I manually execute following script it runs successfully with below output.
bash-3.00# more smssend
#!/bin/bash
echo -e "<Request... (16 Replies)
Hi,
My shell script not getting called through cron job.
The same works fine when executed manually.
I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins:
*/5 * * * * /home/myfolder/abc.sh... (17 Replies)
Hello Gurus,
I have written small script which will start the given service if its stop .Its running fine when manually executed but its unable to run from crontab.
#!/bin/bash
SERVICENAME=rsyslog
service $SERVICENAME status > /dev/null
SYSLOGSTATUS=`echo $?`
COUNT=0
THRESHOLD=3
if ... (4 Replies)
Hi Guys,
I am executing the script called Delet.sh manually it is successfully completing the task but it is failing to run vi cron tab, I tried to pass PATH & .profile before execution but no luck, Any suggestions?
Script below
#!/usr/bin/ksh
#set -x
# Purpose : Delete folders file from... (9 Replies)
I have a script (/home/admin/run_bkup.sh) that I can run manually to kick off an executable job. I want to run it in crontab, but it doesn't work.
Here's the script:
shell=/bin/bash
today=$(date +"%m-%d-%y")
/opt/CPsuite-R77/fw1/bin/upgrade_tools/upgrade_export mgt-svr-bkup-$today << EOF
y... (18 Replies)
Discussion started by: df08388
18 Replies
LEARN ABOUT DEBIAN
scriptmgr2
SCRIPTMGR(1)SCRIPTMGR(1)NAME
scriptmgr - utility for controlling other skytools scripts.
SYNOPSIS
scriptmgr.py [switches] config.ini <command> [-a | job_name ... ]
DESCRIPTION
scriptmgr is used to manage several scripts together. It discovers potential jobs based on config file glob expression. From config file it
gets both job_name and service type (that is the main section name eg [cube_dispatcher]). For each service type there is subsection in the
config how to handle it. Unknown services are ignored.
COMMANDS
status
scriptmgr config.ini status
Show status for all known jobs.
start
scriptmgr config.ini start -a
scriptmgr config.ini start job_name1 job_name2 ...
launch script(s) that are not running.
stop
scriptmgr config.ini stop -a
scriptmgr config.ini stop job_name1 job_name2 ...
stop script(s) that are running.
restart
scriptmgr config.ini restart -a
scriptmgr config.ini restart job_name1 job_name2 ...
restart scripts.
reload
scriptmgr config.ini reload -a
scriptmgr config.ini reload job_name1 job_name2 ...
Send SIGHUP to scripts that are running.
CONFIG
Common configuration parameters
job_name
Name for particulat job the script does. Script will log under this name to logdb/logserver. The name is also used as default for PgQ
consumer name. It should be unique.
pidfile
Location for pid file. If not given, script is disallowed to daemonize.
logfile
Location for log file.
loop_delay
If continuisly running process, how long to sleep after each work loop, in seconds. Default: 1.
connection_lifetime
Close and reconnect older database connections.
log_count
Number of log files to keep. Default: 3
log_size
Max size for one log file. File is rotated if max size is reached. Default: 10485760 (10M)
use_skylog
If set, search for [./skylog.ini, ~/.skylog.ini, /etc/skylog.ini]. If found then the file is used as config file for Pythons logging
module. It allows setting up fully customizable logging setup.
scriptmgr parameters
config_list
List of glob patters for finding config files. Example:
config_list = ~/dbscripts/conf/*.ini, ~/random/conf/*.ini
Service section parameters
cwd
Working directory for script.
args
Arguments to give to script, in addition to -d.
script
Path to script. Unless script is in PATH, full path should be given.
disabled
If this service should be ignored.
Example config file
[scriptmgr]
job_name = scriptmgr_livesrv
logfile = ~/log/%(job_name)s.log
pidfile = ~/pid/%(job_name)s.pid
config_list = ~/scripts/conf/*.ini
# defaults for all service sections
[DEFAULT]
cwd = ~/scripts
[table_dispatcher]
script = table_dispatcher.py
args = -v
[cube_dispatcher]
script = python2.4 cube_dispatcher.py
disabled = 1
[pgqadm]
script = ~/scripts/pgqadm.py
args = ticker
COMMAND LINE SWITCHES
Following switches are common to all skytools.DBScript-based Python programs.
-h, --help
show help message and exit
-q, --quiet
make program silent
-v, --verbose
make program more verbose
-d, --daemon
make program go background
Following switches are used to control already running process. The pidfile is read from config then signal is sent to process id specified
there.
-r, --reload
reload config (send SIGHUP)
-s, --stop
stop program safely (send SIGINT)
-k, --kill
kill program immidiately (send SIGTERM)
Options specific to scriptmgr:
-a, --all
Operate on all non-disabled scripts.
03/13/2012 SCRIPTMGR(1)