Need to schedule

 5 Replies
 0 Subscribed to this topic
 27 Subscribed to this forum
Sort:
Author
Messages
Greg Moeller
Veteran Member
Posts: 1498
Veteran Member
    Here's the situation and requirement:

    Need to schedule a script for the Wednesday following the last Friday of a month.

    It would take a whole lot of extra logic in the script, correct?

    For example:  The last Friday of Jan this year was the 27th.... so the Wed following it would be Feb 1st.

    But, the last Friday of Feb this year was the 24th... so the Wed following it would be Feb 29th.

    How would I most easily accommodate this in my scheduling.
    Jimmy Chiu
    Veteran Member
    Posts: 641
    Veteran Member
      @lastfriday + 5 days?
      Greg Moeller
      Veteran Member
      Posts: 1498
      Veteran Member
        Where would I put that at, Jimmy? I'm used to korn shell, bourne shell, etc. Would this be a dos/windows command or is it more a sql statement?
        Jimmy Chiu
        Veteran Member
        Posts: 641
        Veteran Member
          I would just hard set the 1 day a month value(s) for a year or two and schedule off the list instead of trying to write a script to advance the month if it lapses to next month, recount the day value from 1 etc.

          Sam Simpson
          Veteran Member
          Posts: 239
          Veteran Member
            I created a 4GL (cobol) program just to do like what you wanted. There are several time/date APIs that you can use to determined end of the month date/ and day of the week. From there you can calculate the day following a certain day. So if the day you are testing falls as a Wednesday then simply call the script from the same program. This program has to be scheduled to run everyday. Another method would be to use javascript date/time functions from a processflow and if you have the integrator simply call your script from there.
            Greg Moeller
            Veteran Member
            Posts: 1498
            Veteran Member
              Thanks both of you for the input. I guess I'll just pursue the list option first... that way it'll be quicker to develop (for a non-programmer).