Hi,
I would like to find out how can i calculate a date which is 3 months ago. I intend to run a cron job on the 1st of every month, and calculate the month 4 months earlier from the date. For example, if today's date is 1st May 2007, i would like to return 012007( January 2007).
i can get... (1 Reply)
I know I can't schedule this in cron and would have to write a wrapper around my script and schedule it in cron ....but not sure how do to this?
How do I exclude Monday if the 2nd day of the month falls on a Monday?
Thanks.
I tried this:
0 0 2 * 0,2-6 command
And I know this doesnt... (2 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 Experts,
I have a script which i want to run the on last day of every month.
let say I have backup.sh script which i want to run it every month last day.
Can anyone please help :confused:
thanks (4 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)
Hi all,
I currently have a UNIX file maintenance script that runs daily as a cron job.
Now I want to change the script and create functions/sub inside it that runs on a weekly or monthly basis.
To run all the scripts' daily maintenance, I want to schedule it in cron as simply maint.sh... (1 Reply)
The following bash command line works for the last day of the month. Test by replacing the 1 with tomorrows day of month number
&& echo "Day before tomorrow"Can it be used within crontab? As
* * 28-31 * * && echo "Today ls last day of month" >>/tmp/crontabtestI tried to test crontab with... (1 Reply)
I am looking for a unix script which could run a job on 2, 4 and 7 working day of the month.
if the days are falling on the saturday/sunday. it should run on the next day.
Thank you.. (9 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 OSF1
cal
cal(1) General Commands Manual cal(1)NAME
cal - Displays a calendar
SYNOPSIS
cal [month [year]]
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
cal: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
None
OPERANDS
Names the month for which you want the calendar. It can be a number between 1 and 12 for January through December, respectively. If month
is not specified, cal displays a calendar for the entire year, unless year is also omitted. Names the year for which you want the calen-
dar. Because cal can display a calendar for any year from 1 to 9999, enter the full year rather than just the last two digits. If year is
not specified, cal uses the current year.
If no operands are specified, cal displays a calendar for the current month.
DESCRIPTION
The cal command writes to standard output a Gregorian calendar for the specified year or month.
For historical reasons, the cal command's Gregorian calendar is discontinuous. The display for September 1752 (cal 9 1752) jumps from
Wednesday the 2nd to Thursday the 14th.
The cal command checks the LC_TIME environment variable and uses the correct headers for the current locale. If LC_TIME is not set, cal
checks the value of LANG. If neither variable is set, you receive English headers.
EXIT STATUS
The following exit values are returned: Successful completion. An error occurred.
EXAMPLES
To display a calendar for February 1990, enter: cal 2 1990 To display a calendar for the year 84 A.D., enter: cal 84 To display a calendar
for the current month, enter: cal
ENVIRONMENT VARIABLES
The following environment variables affect the execution of *cmd*: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for-
mat and contents of diagnostic messages written to standard error. Determines the format and contents of the calendar. Determines the
location of message catalogues for the processing of LC_MESSAGES. Determines the time zone used to calculate the value of the current
month.
SEE ALSO
Commands: date(1)
Files: locale(4)
Standards: standards(5)
Command and Shell User's Guide
cal(1)