Skip to main content

Check for file

  • September 21, 2020
  • 2 replies
  • 159 views

Forum|alt.badge.img

Does anyone have any experience creating a worklet to check for a specific file and alert if the file is present in the directory? We are looking to create a worklet that will check for a specific file every hour, and if the file is there, send an alert to the necessary individuals.

2 replies

Forum|alt.badge.img
  • Power User
  • 58 replies
  • September 21, 2020

That seems like something that would be suitable for an antivirus software or something that is constantly monitoring the system. Automox isn’t setup to handle such a task, as the most you can do is scan every 6 hours currently. You can do a simple Test-Path command in powershell and a remediation of Remove-Item. Not sure how you would do alerting however. Additionally, you would have to setup multiple worklet policies since currently AX can only be scheduled to run once a day at most.


Hope this helps!


Nic-Automox
  • Former Automox Employee
  • 832 replies
  • September 21, 2020

Here’s a worklet that is similar that you could modify for your purposes:



If you’re wanting it to check every hour that would require a workaround since each worklet can only be scheduled to run once an day. You’d need 24 copies of the worklet, each set to fire at a different hour.


For something that needs to be checked that often you might be better off with a scheduled task that checks for the file and then fires a notification.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings