Clarity

  • 1.  Schedule job for every second Thursday

    Posted Apr 10, 2014 08:12 AM

    Hello,

    I need to schedule job (Execute a process) to run every second thursday at 4 pm. I googled and I found, that cron should be build like this:

    00 16 */14 * 4

    But the job runs every week. Please have you got any idea how to schedule the job like this? Or is it possible (some workaround)?

    Regards,

    Martin



  • 2.  RE: Schedule job for every second Thursday

    Posted Apr 10, 2014 09:02 AM

    If you've googled this then you've probably found that cron doesn't handle this kind of scenario very well.  How about, instead, running the job weekly but adding a script step to your process that checks whether the current date is in the week you want it to run or not?  I guess you could look at NBI_DIM_CALENDAR_TIME and use the WEEK column, checking whether it is even or odd for today's date as you require.  Branch your process steps accordingly, avoiding the actual main part of the process if the week is not the right week.