Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.

Xander Meadow

I'm trying to trigger some jobs based on monitoring a SharePoint site using a SharePoint Trigger. I have the trigger set to Watch for Created, Modified and Deleted and the trigger is firing appropriately. When I drop file(s) or delete file(s) the Visual Cron job runs. The issue I'm having is the trigger variables that are available within the Visual Cron job are only accurate when I create or delete a single file. The variable I am using is:
and when I create or delete a single file that variable has the correct file name. However, if I create or delete multiple files at the same time, the Visual Cron job runs multiple times (one for each affected file), but the variable in each run is the same. I would expect that for each run the trigger variable would contain the name of the file that caused the job to run, similarly to the way it works when monitoring a local file system.

Does anyone know what settings I should change in order to get the trigger variables to properly represent the files that caused the job to run when more than one file is either deleted or added from/to the SharePoint site? Thank you so much.
Forum information
Your variable says to get the trigger's resulting filename for the active job and the trigger with the given ID, so I think what you're getting is the file that fired that trigger the most recently. The other alternative provided is to use the last trigger to trigger, which I'm still not sure would get you the file that actually triggered it as opposed to the most recent one, and might not even be guaranteed to be the right trigger if you had more than one...I'm not sure how to do what you're looking for, because the last time I needed to do something similar I got to about the point you have and then decided I would just make sure it triggered (at least) once, but I would handle the actual files the same way I would if I were running it on a timer and processing everything that was present instead.

Sorry I can't help more than that.
Xander Meadow
Thanks for the reply. I'm thinking that your suggestion will be the best way to handle this. When you set it up, did you uncheck the

"Put Job in queue (does not skip Job - runs Job when running Job is finished)"

in the main settings of the job? I'm thinking I need to do this since if someone drops multiple files to my SharePoint site I'm going to handle them all in one batch. If I leave it checked (which Visual Cron recommends) the job will run once for each file creation/modification in SharePoint. Thanks again.
Scroll to Top