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!!!
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)
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)
Please log in to answer
Posted by:
dchristian
12 years ago
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)
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