generating a sequence depending on the time of the day
ould we generate a sequence number based on the time of the day?
e.g. an application is scheduled to run from 0800 hrs to 1700 hrs with a frequency of Once every five minutes
the intention is to "assign" a certain value to a variable when depending on the time of the day
i.e. if the time of the day is 0800 hrs then [since it is the 01st run of the job] the value will be 01 [i.e. 1st run]
at 0805 it will be the second run so run_value=02
the need here is that we could calculate the "latest" run value at any time. Thus say, the time of the day is:
1033 hrs then the current "run number" of the job should be [from 0800-1000 hrs --> 12 run per hour times 2 hours i.e. 12 X 2 = 24 +
6 runs in the 30 minutes since 1000 hrs ....
therefore the run number being 24+6 = 30 i.e. the run number of the last run of the application was 30]
the constraint here is that ... these run numbers are limited i.e. they can be only two characters .... the possible values are
could we create a tool with awk/perl that will take in
(i) start time of the application
(ii) end time of the application
(iii) frequency of the application [once every x minutes]
and based on this data - calculcate the latest run number of the job.
What doesn't make sense to me, is that this "run number" will have no discernable meaning after a while. What would happen if you get a run value of say, Q52 ? What would that mean? What happens when you reach zz? Is this some sort of homework assignment?
But please be aware that the intention is that the first run numbers can be as:
only after 99th run number has completed, can we have
Please suggest a method.
Break the loop into two; the first to create the numbered elements and the second to add the letters.
Need assistance . Below code gives me the date but I wanted output as day of the week (wday) .
Code:
use Time::Local;
my $time=timelocal(1,2,3,9,11,2013);
$theTime = localtime($time);
print "$theTime\n";
Result:
Mon Dec 9 03:02:01 2013
Wanted output as only Mon (2 Replies)
Hi all,
I need a script to do some date/time conversion. It should take as an input a particular time. It should then generates a series of offsets, in both hour:minute form and number of milliseconds elapsed.
For 03:00, for example, it should give back 04:02:07 (3727000ms*) 05:04:14... (2 Replies)
I have a question i need clarification. We had a problem on a p520 system and had to pull the battery on the service processor card. That did the trick and system booted. We forgot to set the time in the service processor before booting. Once AIX was booted we changed the date and time there. ... (1 Reply)
hi all,
hope someone can assist in this. I'm trying to make a sequence of time in bash so that the output prints the following;
1950-01-01
1950-02-01
1950-03-01
...
1999-11-01
1999-12-01
In R, i can issue the following command;
t1 <- ISOdate(1950,1,1,0,0,0)
t2 <-... (0 Replies)
Hi Guys,
i have two files:
fileA:
20090611 00:00:11
20090611 00:00:11
20090611 00:00:24
20090611 00:01:10
20090611 07:13:00
fileB:
20090611 00:00:01
20090611 00:00:12
20090611 00:00:24
20090611 00:01:12
20090611 09:13:00
want to make two files into a single file, but follow the... (14 Replies)
Hi all,
I always getting great response from this forum, that why i am putting again....
I am working in a company which is giving ATM support.In one of my production server a lot of files are getting generated every day. I want to move these files to another name.
The file name which is... (4 Replies)
hi i have data extracted in the following format ranging around 300000 to 800000 records in a text file , the format is of network data .
No. Time Source Destination Protocol
1 1998-06-05 17:20:23.569905 HP_61:aa:c9 HP_61:aa:c9 ... (1 Reply)
Hi Guys,
I have two dates as start date and end date.. i need to generate files within these two dates with time interval of half an hour....
i.e. Start Date=25/09/07 12:00:00
End Date=26/09/07 12:00:00
Now i need to generate files every half an... (0 Replies)