Simpler crontab entry to execute pgm on last day of the month
The following bash command line works for the last day of the month. Test by replacing the 1 with tomorrows day of month number
Can it be used within crontab? As
I tried to test crontab with the above entry (forcing dates) and I was was not able to get results
Last edited by lsatenstein; 03-17-2015 at 07:48 AM..
Reason: Discovered that %d in crontab needs % to be escaped
Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Hi All,
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
I am using the code below modified from a post I saw here regarding having the script write out future dates. The problem is that instead of making 8/1 it makes 7/32! Please help!
yy=`date +%Y`
mm=`date +%m`
dd=`date +%d`
echo "Today is : $yy $mm $dd"
#!/usr/bin/ksh
date '+%m... (5 Replies)
Hello Friends,
I have a cron tab like this:
10,40 1-23 * * * /script
i want to skip only one execution at 00:10, so basically i want it to execute every hour at 10th and 40th minute, except 00:10.
Could anyone help me doing this
Thanks folks
:b: (4 Replies)
Hello All,
I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer.
Any ideas would be appreciated! (5 Replies)
Hello Guys,
I have a questions regarding running a shell script every second working day each month.
I have no clue how solve this problem :wall:.
Important is that it has to be the second working (Mo-Fr).
Example: If 1st and 2nd Days of month are Sat and Sun the script must run on 4th day... (5 Replies)
I have created this program to get the next month and year. Is there a simpler way.
#!/bin/ksh
string=`cat Date.txt`
year=`echo $string | cut -c 1-4`
month=`echo $string | cut -c 5-6`
echo $year$month
mon=`expr $month + 1`
if ; then
mon=0$mon
echo $mon
fi
if ; then
month=01
... (2 Replies)
I have query apply crontab entry that the script executes as below
day hours (before 8:00 PM and after 7:00 AM) execute every 5 min
in Night hours (after 8:00 PM to 7:00 AM) executes every 15 min
How can we set such entry in crontab ? (4 Replies)
Discussion started by: kaushik02018
4 Replies
LEARN ABOUT PHP
holidays
holidays(4) File Formats holidays(4)NAME
holidays - prime/nonprime table for the accounting system
SYNOPSIS
/etc/acct/holidays
DESCRIPTION
The /etc/acct/holidays file describes which hours are considered prime time and which days are holidays. Holidays and weekends are con-
sidered non-prime time hours. /etc/acct/holidays is used by the accounting system.
All lines beginning with an "*" are comments.
The /etc/acct/holidays file consists of two sections. The first non-comment line defines the current year and the start time of prime and
non-prime time hours, in the form:
current_year prime_start non_prime_start
The remaining non-comment lines define the holidays in the form:
month/day company_holiday
Of these two fields, only the month/day is actually used by the accounting system programs.
The /etc/acct/holidays file must be updated each year.
EXAMPLES
Example 1: Example of the /etc/acct/holidays file.
The following is an example of the /etc/acct/holidays file:
* Prime/Nonprime Table for the accounting system
*
* Curr Prime Non-Prime
* Year Start Start
*
1991 0830 1800
*
* only the first column (month/day) is significant.
*
* month/day Company Holiday
*
1/1 New Years Day
5/30 Memorial Day
7/4 Indep. Day
9/5 Labor Day
11/24 Thanksgiving Day
11/25 day after Thanksgiving
12/25 Christmas
12/26 day after Christmas
SEE ALSO acct(1M)SunOS 5.10 28 Mar 1991 holidays(4)