06-20-2014
My fault - %u is 1 - 7, thus Sunday will by 7 then. With %w, 0 is Sunday.
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to create an automated script which is called by another maually executed script.
The condition is that the no one should be able to manually execute the automated script.
The automated script can be on the same machine or it can be on a remote machine.
Can any one suggest a check in the... (1 Reply)
Discussion started by: adi_bang76
1 Replies
2. Solaris
Hi ,
I have a date parameter passed in YYYYMMDD format , how can I check whether it is Sat or Sun on Solaris box , as we can do the same easily on linux box by using date -d YYYYMMDD '+a' .
Any pointres will be really helpful . (5 Replies)
Discussion started by: harpreetanand
5 Replies
3. Shell Programming and Scripting
Hi,
i have a script 'a.sh' that should be called only by certain scripts like b.sh, c.sh
Inside a.sh, how can i determine
1) if this script was run directly from command prompt (or scheduler)
2) if called via other scripts?
Is there an easy way to get parent process name (not just pid),... (2 Replies)
Discussion started by: ysrinu
2 Replies
4. Shell Programming and Scripting
Hello,
I wanted to run one of my shell script for every sunday at 5PM.
Here is the crontab entry i am using..
00 17 * * 0 /inventory/update.sh > /inventory/update.log 2>&1
The job is not kicking on sunday at the specified time.. Am i missing anthing?
Any help is appreciated... (2 Replies)
Discussion started by: govindts
2 Replies
5. Shell Programming and Scripting
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies
6. UNIX for Dummies Questions & Answers
I was to schedule a script in a crontab after every 15 days specically on every 2nd Sunday.
I know that i can schedule on basis of weekdays, but can it be done by skipping in between???:wall: (5 Replies)
Discussion started by: masquerer
5 Replies
7. UNIX for Advanced & Expert Users
Hi,
I need to create a autosys job which will run on every sunday at 7:30 AM NY time for each 10 min interval of time.
days_of_week: su
start_mins: 0,10,20,30,40,50
run_window:"07:30"
Is it fine? Please help
Thanks,
Anup (2 Replies)
Discussion started by: anupdas
2 Replies
8. Shell Programming and Scripting
Hello,
I'm looking for a bash script, that I will run from cron, that executes a php script. After 5 minutes that the php script is executed, the bash script, must check a value in a text file /public_html/check.txt
if check.txt = 0 the script will stop, if check.txt is not = 0 it must... (0 Replies)
Discussion started by: andymc1
0 Replies
9. Shell Programming and Scripting
Hi all,
I have a script that can be run via cron or via the command line.
Is there any way that I can place something on the script to be able to distinguish/differentiate whether the script was run via a user in the command line or whether it was run from the cron? (3 Replies)
Discussion started by: newbie_01
3 Replies
10. Shell Programming and Scripting
Hi ALL,
I have been testing this script to run for every last Sunday of the month,looks like month which have 5 sunday (july 2016 )is not passing this and failing every time.
Here is what I am using,
current_date=31
echo " CURRENT DAY -> $current_date"
if
... (2 Replies)
Discussion started by: netdbaind
2 Replies
LEARN ABOUT DEBIAN
cronosplit
cronosplit(1m) cronosplit(1m)
NAME
cronosplit - split log files into cronolog-compatible files
SYNOPSIS
cronosplit --template=TEMPLATE [--print-invalid] [--help] [--version] file ...
DESCRIPTION
cronosplit is a simple program that reads lines from a set of input log files, which must be in Common Log Format or NCSA Combined/XLF/ELF
Format and write each lines to an output files, the name of which is constructed using the template specified and timestamp from the the
line. The template uses the same format specifiers as the Unix date(1) command (which are the same as the standard C strftime library
function).
Options
cronosplit accepts the following options and arguments:
--template=TEMPLATE
specifies the template for the output log files (using the format specifiers described below).
--print-invalid
print invalid log file entries to the standard error stream.
--utime
update modification time of output file according to last parsed log entry.
--verbose
print additional status messages to the standard error stream.
--debug
print debug messages to the standard error stream.
--help print a help message and then exit.
--version
print version information and exit.
Template format
Each character in the template represents a character in the expanded filename, except for date and time format specifiers, which are
replaced by their expansion. Format specifiers consist of a `%' followed by one of the following characters:
% a literal % character
n a new-line character
t a horizontal tab character
Time fields:
H hour (00..23)
I hour (01..12)
p the locale's AM or PM indicator
M minute (00..59)
S second (00..61, which allows for leap seconds)
X the locale's time representation (e.g.: "15:12:47")
Z time zone (e.g. GMT), or nothing if the time zone cannot be determined
Date fields:
a the locale's abbreviated weekday name (e.g.: Sun..Sat)
A the locale's full weekday name (e.g.: Sunday .. Saturday)
b the locale's abbreviated month name (e.g.: Jan .. Dec)
B the locale's full month name, (e.g.: January .. December)
c the locale's date and time (e.g.: "Sun Dec 15 14:12:47 GMT 1996")
d day of month (01 .. 31)
j day of year (001 .. 366)
m month (01 .. 12)
U week of the year with Sunday as first day of week (00..53, where week 1 is the week containing the first Sunday of the year)
W week of the year with Monday as first day of week (00..53, where week 1 is the week containing the first Monday of the year)
w day of week (0 .. 6, where 0 corresponds to Sunday)
x locale's date representation (e.g. today in Britain: "12/04/96")
y year without the century (00 .. 99)
Y year with the century (1970 .. 2038)
Other specifiers may be available depending on the C library's implementation of the strftime function.
SEE ALSO
apache(1m) cronolog(1m) date(1) strftime(3) environ(5)
More information and the latest version of cronolog and cronosplit can be obtained from
http://www.ford-mason.co.uk/resources/cronolog/
If you have any suggestions, bug reports, fixes, or enhancements, please mail them to the author.
More about Apache
Documentation for the Apache http server is available from
http://www.apache.org
AUTHOR
Andrew Ford <A.Ford@ford-mason.co.uk>
cronosplit is based on a script called splitlog by Roy Fielding, which is part of the wwwstat package.
March 1998 cronosplit(1m)