I have the following crontab entry.
0,30 00-16 * * *
This job runs every 30 minutes between the hours of 12:00AM and 4:00PM. How can I have it stop at 4:30PM instead?
Thank you,
David (3 Replies)
I have it set to the following
0 9 * * 1,3,5 /var/tmp/sys_diag
It ran correctly on Wednesday but did not run on Friday and I am not sure why, does the above appear to be correct? (3 Replies)
Hi,
I need to write a shell script which will run i background and will execute other script only on Mon to Fri 10 AM but not on Sat and Sun.
I am able to set it to run on every day at 10AM but how to make it to run only on Mon to Fri
Thanks,
Firestar. (7 Replies)
Hi,
I have a spcific box called abc in autosys and below that there are 2 jobs.
my requirement is to run the abc box only on monday and rest of the day the rest of the jobs should be in success status..
---------- Post updated at 03:11 PM ---------- Previous update was at 02:45 PM ----------... (4 Replies)
Guys, yesterday i just make a script with email as a result and put them into crontab, it will execute on 23.33.
Today, i recieved email from system twice as result the script. the first email send at 23.02 and the second send at 23.33
how is the script execute two times ? the first job run... (6 Replies)
Hi all,
I would like to schedule a crontab script, which should run From 8pm Thursday to 2am Friday and it should run every 10 minutes. I have put a script like below, is it the correct one.
10 01,02,20,21,22,23,00 * * 4-5 /u01/app/test.ksh
Any other options available to schedule the same... (6 Replies)
Hi All,
How to schedule crontab on all day except sunday and monday means from tuesday to saturday at 06:00AM. (3 Replies)
Discussion started by: Riverstone
3 Replies
LEARN ABOUT CENTOS
shell-quote
SHELL-QUOTE(1) User Contributed Perl Documentation SHELL-QUOTE(1)NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS --debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.16.3 2010-06-11 SHELL-QUOTE(1)