/build/static/layout/Breadcrumb_cap_w.png

How to schedule the creation of a ticket for specific months?

I have no experience of MYSQL, but was wondering if anyone could guide me on how to create a ticket that runs only on specific months.
I downloaded the rule template from this KB (http://www.kace.com/support/kb/index.php?action=artikel&cat=8&id=719) and this works well for normal weekly or monthly tickets.
If I could get the rule to run on specific months for certain tickets that would be great.
Any help is greatly appreciated!!!

0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
You can add the month function to the where of your SQL statement. For example to run the rule every other month you could do this: MONTH(NOW()) IN (1,3,5,7,9,11)
Posted by: dchristian 12 years ago
Red Belt
3
You can add the month function to the where of your SQL statement. For example to run the rule every other month you could do this:

MONTH(NOW()) IN (1,3,5,7,9,11)

Comments:
  • This is the syntax from the rule template I downloaded

    select EMAIL QUEUEMAIL,
    MONTHNAME(NOW()) MONTH FROM USER
    JOIN USER_LABEL_JT UL ON USER.ID=UL.USER_ID
    JOIN
    HD_QUEUE_OWNER_LABEL_JT QO ON QO.LABEL_ID=UL.LABEL_ID
    JOIN HD_QUEUE Q ON Q.ID=QO.HD_QUEUE_ID
    WHERE EMAIL_USER = SUBSTRING_INDEX(EMAIL,'@',1)
    and EMAIL = 'servicedesk@10.xx.xx' /* change this to match your queue's primary email address */
    and Q.NAME='The K1000 Service Desk' /*change this to match your queue name */

    What do I need to change to get the rule to run every other month? - nvk 12 years ago
    • select EMAIL QUEUEMAIL,
      MONTHNAME(NOW()) MONTH FROM USER
      JOIN USER_LABEL_JT UL ON USER.ID=UL.USER_ID
      JOIN
      HD_QUEUE_OWNER_LABEL_JT QO ON QO.LABEL_ID=UL.LABEL_ID
      JOIN HD_QUEUE Q ON Q.ID=QO.HD_QUEUE_ID
      WHERE EMAIL_USER = SUBSTRING_INDEX(EMAIL,'@',1)
      and EMAIL = 'servicedesk@10.xx.xx' /* change this to match your queue's primary email address */
      and Q.NAME='The K1000 Service Desk' /*change this to match your queue name */
      AND MONTH(NOW()) IN (1,3,5,7,9,11) - dchristian 12 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ