4 attachments
-
2 KB
-
33 KB
-
26 KB
-
91 KB
Just a side note, in the future if we upgrade the Schema for Aqua Data Server you may need to alter the Query to retrieve the Failed Status messages used in that AquaScript . Just a side note, in the future if we upgrade the Schema for Aqua Data Server you may need to alter the Query to retrieve the Failed Status messages used in that AquaScript .
Hi Brian,
1.) I have attached a sample AquaScript which you can schedule to run every 1 hour which will save all Failed jobs as an Excel File and email the report to you. Create a new Server connection for your Aqua Data Server Database under the Servers Tab in your Project.
Edit the attached script to provide the correct server connection. Also point to the correct directory path in your Aqua Data Server installation, to save your Excel File in lines 32 and 44.
You can remove the Limit Clause i have used in line 17 as well.
2.) You can specify a range in the SQL provided in line 17. The field is run_at and you can use it to suite your date ranges. For e.g below query will create an excel with all name, time and failed status for jobs within the last 1 hour.
query = 'SELECT ST.name, TH.run_at, TH.status FROM schedule_tasks ST, schedule_task_history TH where ST.schedule_id=TH.schedul
3.) You would need to edit your System Settings and provide details of your Email Service. See attached screenshot. Make sure the Email Queue is started in Admin -> Email Queue.
Let us know if you have any more questions.
Thanks,
Tariq Hi Brian, 1.) I have attached a sample AquaScript which you can schedule to run every 1 hour which will save all Failed jobs as an Excel File and email the report to you. Create a new Server connection for your Aqua Data Server Database under the Servers Tab in your Project. Edit the attached script to provide the correct server connection. Also point to the correct directory path in your Aqua Data Server installation, to save your Excel File in lines 32 and 44. You can remove the Limit Clause i have used in line 17 as well. 2.) You can specify a range in the SQL provided in line 17. The field is run_at and you can use it to suite your date ranges. For e.g below query will create an excel with all name, time and failed status for jobs within the last 1 hour. query = 'SELECT ST.name, TH.run_at, TH.status FROM schedule_tasks ST, schedule_task_history TH where ST.schedule_id=TH.schedule_task_id and TH.status=\'Failed\' and run_at between DATE_SUB(NOW(),INTERVAL 1 HOUR) and NOW()'; 3.) You would need to edit your System Settings and provide details of your Email Service. See attached screenshot. Make sure the Email Queue is started in Admin -> Email Queue. Let us know if you have any more questions. Thanks, Tariq