cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement one Cron Job to get all existing cronjobs statuses report to send an email?

former_member652953
Discoverer
0 Kudos

How to implement one generic Cron Job to get all existing cronjobs daily statuses report to send an email?

Example: Orderstatus cron job...ect

cronJobname , currentstatus, currentresult time

Thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member646143
Participant
0 Kudos

You have to Create one Custome type extending CronJob with attributes like flexyquery,header,emailTemplate and more

emailTemplate type should be RenderedTemplate and rest all attribute types should be String Collection.

You can also have excelfilename as attribute to send the all the cronjob in a mail as a attachment.

Write a impex with above custom type.

Your Flexy query should hold the query to get list of cronjob

Impex should be something as below,

INSERT_UPDATE CustomReportCronJob; code[unique=true];job(code);mailTemplate(code);singleExecutable;sessionLanguage(isocode);country(isoCode);channel(code);nodeID;sendEmail;emailAddress;source(code);flexiQueries[collection-delimiter=|];csvHeaders[collection-delimiter=|];viewAttributes[collection-delimiter=|];viewAttributesTypes[collection-delimiter=|];modelAttributeRowsForCSV[collection-delimiter=|];excelSheetNames[collection-delimiter=|]