File trigger starts job several times - VisualCron - Forum

Community forum

dsjere
2012-09-11T07:39:56Z
Hi.

A file trigger that is set to trigger a job when a file is created, started the job three times.
The job has worked for a year or two but all of a sudden it triggers three times in one second.

I patched the server the day before but I don´t think that could have caused it because I have other jobs with triggers that is set up the same way, and those triggered only one time.

I unchecked the checkbox Put job in queue in the main tab of the job and I think that will help.

I am puzzled and curious why this happened and I think it could become a problem in the future.

Can I send you the log and is there anything else you would need to have a look at this problem?

Regards.

/Jesse
Support
2012-09-18T11:45:59Z
Hi Jesse,

sorry for the late reply. Are you using 6.1.3 now? Please contact us directly through support@visualcron.com so we can resolve this.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
bbusse
2012-09-20T15:33:19Z
We ran into this, running on Version 6.0.6 a few weeks ago.

If I opened Notepad, and did file/save-As, and saved as the file the trigger was watching for, the job would run twice in short succession. I had all the appropriate boxes checked, etc... to only run when released, put in queue, etc...

So I figured maybe Notepad did something odd. I then opened a command prompt and did the old trick of 'echoing' something to a file which would create it if it didn't exist.

echo "testing trigger creation" >c:\TestTrigger.trg
This also resulted in multiple executions of the job in a split second.

However, when I used a command line utility to do it, such as FSUTIL, it worked fine and only executed once.

Example:
fsutil file createnew c:\TestTrigger.trg 1000

We honestly haven't gotten around this yet and I hadn't asked support about it since we're just using a batch file for users to execute the jobs via file trigger now and it calls FSUTIL to do the work. Java methods of creating files seem to work also, though I don't know the code being used to do it.

Just wanted to inform Support and others, its not just the OP having this issue. not sure if its fixed in 6.1.3 yet or not, haven't upgraded yet.

Brian
ErikC
2012-09-26T05:54:56Z
Running 6.1.3. here.

Had the same issue for the last two days.

I restarted the Visualcron service to 'reset' the service and now the file create runs only once.

Regards,
Erik
Uses Visualcron since 2006.
Support
2012-09-26T10:30:23Z
Ok, so first we want to know if the Trigger really triggers twice or if it is just the Job that runs twice. For you Eric we have some interesting debugging if you use Extended debugging.

We would really appreciate if you could send us the log_serverDATE.txt after it has Trigger twice. Please let us know Job Name and Date and we should now a lot more about when and where this happens.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2012-09-26T11:29:09Z
Hi Henrik,

I'll send you a log through mail, I have however not the Extended debug setting enabled. I've turned it on now hoping to get more info when it happens again.

Regards,
Erik
Uses Visualcron since 2006.
trevinom
2012-09-26T13:12:12Z
We are running 6.1.1 on a Windows Server 8 box.
I've noticed that triggers start running multiple times and trigger dependencies get messed up after leaving the server up for more than a week. I set the server to reboot once a week and the problems have gone away for the last month or so since I started doing this.
Support
2012-09-26T13:14:34Z
Originally Posted by: trevinom 

We are running 6.1.1 on a Windows Server 8 box.
I've noticed that triggers start running multiple times and trigger dependencies get messed up after leaving the server up for more than a week. I set the server to reboot once a week and the problems have gone away for the last month or so since I started doing this.



Trevinom, are these file triggers as well? Please upgrade to 6.1.3 and run extended debugging set. Next time it happens mail us Job name and time together with the file.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
trevinom
2012-09-26T17:35:14Z
I've got a number of critical, high visibility jobs running on the box that prevents me from upgrading at the time. I will need to do thorough testing on our test box that has already been upgraded to 6.1.3. I am having a hard time replicating the errors on the test box because it does not have the same level of volume.
Since I starting rebooting the production machine, the problems stopped, so I can't send you an extended debugging log. I will keep an eye on it.
trevinom
2012-10-02T12:25:16Z
So I experienced the problem again last night. Luckily, all it did was produce an error email.
It looks like the trigger fired off upon the file being created and released.
This is the way it's been set up and has not fired off more than once in months.
I have attached a screenshot of the trigger specifics.

Here is the log you asked for.
10/1/2012 8:06:22 PM Debug Memory cleanup
10/1/2012 8:06:22 PM Debug Saving output files and clearing output memory.
10/1/2012 8:06:22 PM Debug Output stored in memory: 670
10/1/2012 8:06:22 PM Debug ´Calling CleanUp.
10/1/2012 8:06:22 PM Debug Memory usage before cleanup: 116547584
10/1/2012 8:06:22 PM Debug Memory usage after cleanup: 116547584
10/1/2012 8:06:22 PM Debug Number of running Threads: 50
10/1/2012 8:06:22 PM Debug Number of Handles: 1162
10/1/2012 8:06:22 PM Debug Number of running Jobs: 0
10/1/2012 8:06:22 PM Debug Number of running Tasks: 0
10/1/2012 8:06:22 PM Debug Log was trimmed from: 1172 to 1005
10/1/2012 8:06:47 PM Debug File trigger event (objectchanged): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (enter lock): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (before counter check): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (in counter check): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (result object created): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (after file release): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (in fire trigger):
10/1/2012 8:06:47 PM Info Job started: Prod: Process RP266 Daily file from State Comptroller for EFT returns.
10/1/2012 8:06:47 PM Debug Job (842) was added to processlist: Prod: Process RP266 Daily file from State Comptroller for EFT returns.
10/1/2012 8:06:47 PM Debug Next action: ActionContinue
10/1/2012 8:06:47 PM Debug File trigger event (before sending result): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (after sending result): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (exit lock): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (objectchanged): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (enter lock): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (before counter check): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (in counter check): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (result object created): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug Running File Notification: 'Prod: Create task output file.'
10/1/2012 8:06:47 PM Debug Calling GetNextTaskProcess()
10/1/2012 8:06:47 PM Debug Next Task is: Prod: Copy file from 'c:\ftp\ftp_root\RP266DALY' to the 'c:\ftp\ftp_root\RP266\<YYYYMMDD>RP266DALY' directory
10/1/2012 8:06:47 PM Debug Next action: ActionContinue
10/1/2012 8:06:47 PM Debug Calling StartTaskProcess() with Task: Prod: Copy file from 'c:\ftp\ftp_root\RP266DALY' to the 'c:\ftp\ftp_root\RP266\<YYYYMMDD>RP266DALY' directory (0)
10/1/2012 8:06:47 PM Debug Task (2902) was added to processlist: Prod: Copy file from 'c:\ftp\ftp_root\RP266DALY' to the 'c:\ftp\ftp_root\RP266\<YYYYMMDD>RP266DALY' directory
10/1/2012 8:06:47 PM Info Task started: Prod: Copy file from 'c:\ftp\ftp_root\RP266DALY' to the 'c:\ftp\ftp_root\RP266\<YYYYMMDD>RP266DALY' directory (2902)
10/1/2012 8:06:47 PM Debug Entering wait loop. Prod: Copy file from 'c:\ftp\ftp_root\RP266DALY' to the 'c:\ftp\ftp_root\RP266\<YYYYMMDD>RP266DALY' directory (2902)
10/1/2012 8:06:47 PM Debug Impersonation result 1: <ImpersonationResultClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><LoggedOn>true</LoggedOn><ProfileLoaded>false</ProfileLoaded><UsingLocalLogon>false</UsingLocalLogon><ImpersonatedAs>NT AUTHORITY\SYSTEM</ImpersonatedAs><ErrorOccured>false</ErrorOccured><ErrorString /></ImpersonationResultClass>
10/1/2012 8:06:47 PM Debug File trigger event (after file release): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (in fire trigger):
10/1/2012 8:06:47 PM Debug Job 'Prod: Process RP266 Daily file from State Comptroller for EFT returns.' was queued because it was already running.
10/1/2012 8:06:47 PM Debug File trigger event (before sending result): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (after sending result): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Debug File trigger event (exit lock): 1, path: c:\ftp\ftp_root\RP266DALY
10/1/2012 8:06:47 PM Info Task completed: Prod: Copy file from 'c:\ftp\ftp_root\RP266DALY' to the 'c:\ftp\ftp_root\RP266\<YYYYMMDD>RP266DALY' directory (2902)
10/1/2012 8:06:47 PM Debug Process status - About to RemoveTaskProcess (2902)
10/1/2012 8:06:47 PM Debug Setting previous task in TaskProcessCompleted: Prod: Copy file from 'c:\ftp\ftp_root\RP266DALY' to the 'c:\ftp\ftp_root\RP266\<YYYYMMDD>RP266DALY' directory (1b38943a-abda-424f-bd18-8b1c72893db1) in job: Prod: Process RP266 Daily file from State Comptroller for EFT returns.
10/1/2012 8:06:47 PM Debug Process status - About to SendTaskProcess (2902)
trevinom attached the following image(s):
bbusse
2012-10-02T15:00:18Z
I just reproduced this as well, running 6.1.3 on our QA server.

I created a new job named 'Test'. There are no tasks.
I created a new file trigger looking in "c:\Temp" for a file named "trigger.txt"

Now, I tried doing this via command prompt and it only executed once:
echo test >c:\temp\trigger.txt

So, I deleted the trigger.txt file and tried another method of creating the file:
I opened Notepad and did a FILE-->Save As and saved the blank text file as c:\temp\trigger.txt

Immediately, the job ran twice. Also, when I created the trigger and saved it, I was prompted to put the job in queue, which i said yes to.

Attached is a screenshot of the trigger and the job log. First entry is the command prompt method, the other 2 pairs of runtimes are me using Notepad to make sure it wasn't a fluke.

Brian
bbusse attached the following image(s):
Support
2012-10-03T09:05:40Z
Thank you all for feedback. I am not sure if you are experiencing the same problem.

bbusse had some interesting feedback which we were able to reproduce. For some reason the operating system triggers file creation twice when saving from Notepad for example. We were able to reproduce the same problem in other third party file monitoring tools. We do not know why but did a workaround for this in this version:

http://www.visualcron.co....aspx?g=posts&t=2689 

We would appreciate if you all installed this version. First it includes the fix but also additional debugging on the issue. Make sure you have "Extended debugging" checked in settings.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
bbusse
2012-10-03T15:28:42Z
^^ I can confirm that this new version of 6.1.4 with the fix does make it so Notepad does not trigger the job twice. Thanks Henrik! Not sure if this fixes the OP's issue or not, but it at least solves 'my' problem :)

Brian
ErikC
2012-10-18T06:26:54Z
Hi,

Here still on 6.1.3 and I have the issue again for a few days now.
I will email the logs of two days one with correct, and one incorrect trigger events.
The extended log checkbox is turned on, so the files are hudge.

I'll explain more in the mail.

Regards,
Erik
Uses Visualcron since 2006.
Scroll to Top