Are you trying to determine if the script is started on the correct day, i.e. 2nd & 4th Monday only?
If so, start it every day and have a section to test the date at the top similar to this:-
Apologies if I have missed the point, but I hope that this helps.
Hi,
I am trying to do achieving of files by months.
find /test -name \*.* -mtime +30
will give me the result of all modified files after 30 days.
But lets say i want to list all files that is modified in last months... what is the command to do it?
Thanks! (13 Replies)
Help please! I need to read the calendar and put the date of the third Friday of each month into a variable for comparison in an "if" statement. How would I do this?
Thnx,
leslie02 (10 Replies)
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)
Hi All
Any one please suggest me...
I have one directory every monday one file will be created in that directory. so if the file is created on monday or not i need check first.
How can write a script??? if the file is not created i want to quit from script.
Thanks
K.Srinivas (5 Replies)
Hi All,
I need to find last two files for the month.
lets say there are following files in directory
-rwxr-xr-x 1 user userg 1596 Mar 19 15:43 c.txt
-rwxr-xr-x 1 user userg 1596 Mar 21 15:43 d.txt
-rwxr-xr-x 1 user userg 1596 Mar 22 15:43 f.txt
-rwxr-xr-x 1... (14 Replies)
Hi,
I want two dates one will be the current date and the other one will be just one month before. Say if current month is 11/4/2014 then the other date should be 11/3/2014.
#!/bin/ksh
currentDtae=`date`
oneMonthBefore= ?
I dont know how to do it. Went through some of the related threads... (15 Replies)
Discussion started by: Sharma331
15 Replies
LEARN ABOUT DEBIAN
ns_fmttime
ns_time(3aolserver) AOLserver Built-In Commands ns_time(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_time, ns_fmttime, ns_gmtime, ns_localtime, - commands
SYNOPSIS
ns_fmttime time ?format string?
ns_gmtime
ns_localtime
ns_time
_________________________________________________________________DESCRIPTION
ns_time: Returns the value of time in seconds since 00:00:00 UTC, January 1, 1970. This return value is suitable as input to the ns_http-
time function to get the current time.
ns_fmttime: Formats the time string,time,according to the format provided in format string. If no format is provided, defaults to "%a %b %e
%H:%M:%S %Z %Y".
ns_gmttime: Returns a Tcl list of the pieces of the current Greenwich Mean Time. The pieces are
seconds (0-59)
minutes (0-59)
hours (0-23)
dayofmonth (1-31)
monthofyear (0-11)
year (year-1900)*
dayofweek (Sunday=0)
dayofyear (0-365)
1 if Daylight Savings Time is in effect
ns_localtime: Returns a Tcl list of the pieces of the current local time. The pieces are
seconds (0-59)
minutes (0-59)
hours (0-23)
dayofmonth (1-31)
monthofyear (0-11)
year (year-1900)*
dayofweek (Sunday=0)
dayofyear (0-365)
1 if Daylight Savings Time is in effect
EXAMPLES
ns_fmttime [ns_time] returns: Tue Nov 12 15:14:47 2002 ns_fmttime [ns_time] "%Y%m%d" returns: 20021112
SEE ALSO
ns_httptime
KEYWORDS AOLserver 4.0 ns_time(3aolserver)