10-25-2016
- Before the /tmp... use >> instead of >
- If you schedule it once per day (at 9:30) then it is normal that is only run once per day
- Avoid to name a script "test" : "test" already is the name of a unix command ... (as well as "script" by the way ! )
- Don't use the same logfile inside your script and from crontab (conflicting redundancy by concurrent access )
Last edited by rbatte1; 10-26-2016 at 10:24 AM..
Reason: Converted to formatted number-list
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a crontab as below:
PATH=/usr/local/sbin:/bin/:..... etc etc
0 8 * * * /home/user/jobs/poll.sh 2>/dev/null 1>/dev/null
Now the script poll.sh is called at correct time and executes.
This is how poll.sh looks like
#!/bin/bash... (2 Replies)
Discussion started by: chakrapani
2 Replies
2. Shell Programming and Scripting
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)
Discussion started by: fakesy
5 Replies
3. Shell Programming and Scripting
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)
Discussion started by: hs3082
14 Replies
4. Shell Programming and Scripting
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)
Discussion started by: umarsatti
16 Replies
5. Shell Programming and Scripting
Hello Team,
As a part of my job we have made a script to automate a service to restart frequently.
Script having two functions when executing it's should find the existing service and kill it, then start the same service . Verified the script it's working fine when executing... (18 Replies)
Discussion started by: gowthamakanthan
18 Replies
6. Shell Programming and Scripting
Hello All,
I have created a shell script, When i run it manually as ./<script_name> it takes 5 hours to run, but when i am scheduling it in crontab, it is taking 20 hours to run.
Please help me and advice, what can be done to reduce the time in crontab.
Thank you (6 Replies)
Discussion started by: anand2308
6 Replies
7. Shell Programming and Scripting
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)
Discussion started by: kapil514
4 Replies
8. UNIX for Dummies Questions & Answers
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)
Discussion started by: Anilsa77
9 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
Hi,
Attached is a generated script of the database files if/when we want to run dbv = dbverify.
The script runs fine by itself but it does take awhile to finish. In a worse case scenario, it can take up to 7 hours to finish as the dbv runs serially.
I need help and guidance to somehow... (5 Replies)
Discussion started by: newbie_01
5 Replies
ATRUN(8) BSD System Manager's Manual ATRUN(8)
NAME
atrun -- run jobs queued for later execution
SYNOPSIS
atrun [-l load_avg] [-d]
DESCRIPTION
atrun runs jobs queued by at(1). Root's crontab(5) must contain the line:
*/10 * * * * root /usr/libexec/atrun
so that atrun(8) gets called every ten minutes.
At every invocation, every job in lowercase queues whose starting time has passed is started. A maximum of one batch job (denoted by upper-
case queues) is started each time atrun is invoked.
OPTIONS
-l load_avg
Specifies a limiting load factor, over which batch jobs should not be run, instead of the compiled-in value of 1.5.
-d Debug; print error messages to standard error instead of using syslog(3).
WARNINGS
For atrun to work, you have to start up a cron(8) daemon.
FILES
/var/at/spool Directory containing output spool files
/var/at/jobs Directory containing job files
SEE ALSO
at(1), crontab(1), syslog(3), crontab(5), cron(8)
AUTHORS
Thomas Koenig <ig25@rz.uni-karlsruhe.de>
BUGS
The functionality of atrun should be merged into cron(8).
BSD
April 12, 1995 BSD