Kaseya Community

Agent Procedure not working

This question is answered

When I run the below agent procedure I receive a email even if the file exits or not - is it another statement that is needed?
Here is my procedure

if testfile("C:\BI\NightlyLogs\ETL-Failed.log") Exits
sendmail ("aharris@dobergroup.com", "ETL-Test", "ETL-Test, "all windows operating systems", "continue on Fail")

Verified Answer
  • I think you might need to indent your sendEmail step. Highlight it, then press Tab on your keyboard. Save and test again.

  • It worked !!   I tested with and without test file. thanks you so much for your help. I'm new to Kaseya and script writing. Thanks again.

All Replies
  • I think you might need to indent your sendEmail step. Highlight it, then press Tab on your keyboard. Save and test again.

  • It worked !!   I tested with and without test file. thanks you so much for your help. I'm new to Kaseya and script writing. Thanks again.