Jump to content

Monitoring log files for date change


GlobalIT
 Share

Recommended Posts

I have created a Windows cmd file to copy files nightly on one of my servers. If there is an error, the cmd file outputs the error to an error.txt file, thus updated the "Last Write" date on the file. My command file is working great, and outputs the errors to the error.txt, and the date stamp on the error.txt file is updated each time this happens.

I configured the Pulseway Computer Settings via Notifications -> Storage -> Files. I added the error.txt and checked for notifications to be sent when the file last write date has changed. (see image)

This works the first time, but the second, no notification is sent. Am I doing something wrong? Any pointers on how I can make this work consistently?

Thanks!

image.png.87de2ddc644b91748aad22eb74c1f70c.png

Link to comment
Share on other sites

  • Staff

Hi @GlobalIT,

I would suggest you to use the Plugin 'Notification Bridge' to send notification from your script to the Pulseway at the time when this message is written into that text file or you may send the actual message as the notification using this plugin.

Regarding the notifications - these notifications are not repeating, therefore if you do not delete the previous notification, then the next notification will not be triggered.

Please let me know if you have any further questions regarding this.

 

Link to comment
Share on other sites

Hi Chris. Thanks for the reply.

The script is working right. In fact everything is working right.

You nailed the issue in that I was not deleting the previous notifications, that's why the later notifications were not triggered. That makes sense, as that is the way we would use it normally. 

So all is good!

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...