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


Guest
2011-12-21T14:52:24Z
Hello All,
I've generated a Job with 5 tasks which wrote the log into a local text file.... as last step I've defined Email task whichsend to a specific user this log attached in order to check results of all tasks status. but executing the job the last Email task return the follow error msg

Error when trying to add attachment, err: The process cannot access the file 'C:\VisualCronLog\Nielsen Update DB.log' because it is being used by another process.

the message is clear but how can I send previous Tasks info/results store into my log File?
generally I use dynamic log File, here's an example

File Notification
C:\VisualCronLog\{JOB(Active|Name)}.log

Notification Message example:
>>> Task Name: [{TASK(Active,Order)}] {TASK(Active|Name)} <<<
Start Time: {DATEFORMAT(dd/MM/yyyy H.mm)}
Trigger: {TRIGGER(Active|LastTrigger|Desc)}
TaskExitCode: {TASK(Active,ExitCode)} - {TASK(Active,ExitCodeDesc)}
TaskOutput: {TASK(Active,StdOut)} :: {TASK(Active,StdErr)}
List of file downloaded/uploaded: {TASK(Active,Result.DownloadedFilesNames)} / {TASK(Active,Result.UploadedFilesNames)}
TaskResult: {TASK(Active,Result)}
JobResult: {JOB(Active,Result)}

Do you have any suggestions or work around for this scenario?

thanks a lot
Sponsor
Forum information
Support
2011-12-21T14:59:49Z
You can exchange Active Id to PrevTask like this:

{TASK(PrevTask,Result)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2011-12-22T14:24:36Z
Hello Henrik,
using PrevTask function I can catch only the last task infos while I would send by email a recap of all Tasks executed. Do I suppose that the file used by notification can't be used as attachment? or do you have any work around for my purpose?

thanks a lot
Support
2011-12-22T15:05:22Z
You can attach the file.

There is not "Job summary Variable". You need to copy paste all Task Variables for now.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2011-12-22T15:23:04Z
my problem is I can't attach log file which updated by Task's notification... the error alarm say that the log file is in use by another process...

I could paste all Task Variables as you suggest, but it would be nice attach log file created by task notification....

thanks a lot at the moment
kind regards


Support
2011-12-22T15:32:28Z
Is it possible to copy that file first? Then add the copy in notification?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2011-12-29T08:07:06Z
Hello Henrik,
I don't follow your advise because the problem is solved now,I don't receive any error message, I'm not sure what I've changed, but after I've modifyed job by console on server and add/remove the attachment configuration (I've deleted and creating again), the email was send correctly.

thanks a lot for your support
Alessandro
Scroll to Top