Forum Discussion

Sid1987's avatar
Sid1987
Level 6
9 years ago

Next Due List

Hi Techiz,

 Do you have a shell script handy to create an html or csv to display next due of policies for entire month day date wise, I have the code for displaying horizontally the day & date of entire month, What I am looking for is if for an entire month I can have daywise entries (x,F,Blank) meaning x if the policy is scheduled for that day, full if that's full backup day, and blank in case there is any exclusion. Here is the code for entire month display which can be used.

#!/bin/ksh93

yearmonth=$( date +"%Y%m" )

d=1
while printf '%(%a)T\t' "$( printf '%s%02d' "$yearmonth" "$d" )" 2>/dev/null
do
    (( ++d ))
done
echo

days_this_month=$(( --d ))
while (( d > 0 )); do
    printf ' %d\t' "$(( days_this_month - (--d) ))"
done
echo

4 Replies

  • Hello

    I am not having a script in hand you are asking for, but maybe such command will be helpful...

    nbpemreq -predict_all -date 02/11/2017 -M master_server

    This will show you due jobs in between now and tomorrow:

    Predicted worklist including all jobs due to run between now and Sat 11 Feb 2017 11:59:59 PM CET

    If you will be running this on daily basis for next day after a month you should be having the list you are asking for.... ;)

    • Sid1987's avatar
      Sid1987
      Level 6

      Thanks Quebek, I did run nbpemreq -due -date command that gives me due list, However I am thinking I might need to drill down bppllist for the data I am looking for, let's see if I can get some other inputs. FYI, I have attached an excel snapshot the way I want the data to be in. I am also working , if few suggestions can speed up the process it would be great.

      • Sid1987's avatar
        Sid1987
        Level 6

        No Suggestions?

        I will post my progress, I am going to use bppllist and see how it goes, I am planning to use html as at the end I need it in excel.