CRON JOB TO RUN once a month

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf CRON JOB TO RUN once a month

  • Creator
    Topic
  • #53785
    mike brown
    Participant

      Hi All

      A little help, please, i am setting up cron to run every second Wednesday of every month at 21:25, i came up with this, i think i am stuck, any ideas… on what i am missing.

      # Bounce thread for Clinical Diagnostic/Ancillary every Second  Wednesday —- ** LIVE **


      #25 21 * * 3 [ `date +%e` -gt 4 -a `date +%e` -lt 11 ] && setroot /quovadx/cis5.8/integrator; setsite mix_1; hcicmd -p pmhb -c ‘xper_o_ob pstop’; sleep 10; hcicmd -p pmhb -c ‘xper_o_ob pstart’

      #25 21 * * 3 [ `date +%e` -gt 4 -a `date +%e` -lt 11 ] && setroot /quovadx/cis5.8/integrator; setsite mix_1; hcicmd -p pmhb -c ‘xcel_o_ob  pstop’; sleep 10; hcicmd -p pmhb -c ‘xcel_o_ob pstart’

      #25 21 * * 3 [ `date +%e` -gt 4 -a `date +%e` -lt 11 ] && setroot /quovadx/cis5.8/integrator; setsite 835700_1; hcicmd -p pmhc -c ‘xcel_a_oc pstop’; sleep 10; hcicmd -p pmhc -c ‘xcel_a_oc pstart’

      #25 21 * * 3 [ `date +%e` -gt 4 -a `date +%e` -lt 11 ] && setroot /quovadx/cis5.8/integrator; setsite citiprod; hcicmd -p pmhc -c ‘xcelera_r_ic pstop’; sleep 10; hcicmd -p pmhc -c ‘xcelera_r_ic pstart’

      #25 21 * * 3 [ `date +%e` -gt 4 -a `date +%e` -lt 11 ] && setroot /quovadx/cis5.8/integrator; setsite citibatch; hcicmd -p pmha -c ‘xper_c_ia pstop’; sleep 10; hcicmd -p pmha -c ‘xper_c_ia pstart’

      #25 21 * * 3 [ `date +%e` -gt 4 -a `date +%e` -lt 11 ] && setroot /quovadx/cis5.8/integrator; setsite citiprod; hcicmd -p pmhc -c ‘xper_r_ic pstop’; sleep 10; hcicmd -p pmhc -c ‘xper_r_ic pstart’

      #

    Viewing 2 reply threads
    • Author
      Replies
      • #78936
        David Barr
        Participant

          What’s happening with the entry? Running every Wed?

          My guess is you need an open paren before the setroot and a close at the end of the line. I think that the semicolon has a higher precedence than the ampersands, so the date test only affects the setroot part of the command.

        • #78937
          Russ Ross
          Participant

            I previously posted an FYI working example of how I run a cron entry the first Thursday of every month that you can use as a reference at this URL:

            <a href="https://usspvlclovertch2.infor.com/viewtopic.php?t=5258&#8243; class=”bbcode_url”>https://usspvlclovertch2.infor.com/viewtopic.php?t=5258

            This should help you get yours working and understand why it doesn’t work currently for you:

            Russ Ross
            RussRoss318@gmail.com

          • #78938
            mike brown
            Participant

              Got it, thanks it works great..

              mike

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.