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.


dsjere
2014-02-11T14:53:36Z
Hello.

We upgraded from 7.0.4 to 7.1.1 last thursday and we are running on W2008 r2.

In several jobs we download files via FTP, and often we use the variables:
{DATEFORMAT(yyyy-MM-dd)} or
{DATE(LastWorkday|yyyy-MM-dd)} in the file mask.

After the upgrade we experienced that sometimes the filemask changed from one of the above variables to the actual date it last was run on.

Example:

File mask Before running: {DATEFORMAT(yyyy-MM-dd)}.txt
Filemask after running: 2014-02-07.txt

This problem is not consistant and appeares irregularly. But to often to be ignored. It happens every day.

We also experienced problems with running office macros and a part of the solution for that was to run the macros with credentials with only "local login" set in the configuration.

For some reason I got the feeling that I should try the same on the FTP jobs.

Have you got any ideas about what the prablem can be?

Regards

/Jesse

Sponsor
Forum information
Support
2014-02-11T15:30:01Z
Yes, this is a bug in 7.1.1. Please upgrade to 7.1.2. and update the Variables again. Sorry for the problems.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2014-02-11T15:52:32Z
Ok, thanks. I'm just happy there is a solution.

dsjere
2014-02-12T14:07:12Z
Hello again.

The date variables seems to be working now after we installed 7.1.2.

We still have problems executing MS Access macros though.

We had the same problem a while ago and you helped us with setting credentials to local login only. Now we get the folowing errer output when we run the Access macros:

With credentials local login:

System.Runtime.InteropServices.COMException (0x800A07D1): You canceled the previous operation.
at Microsoft.Office.Interop.Access.DoCmd.RunMacro(Object MacroName, Object RepeatCount, Object RepeatExpression)
at gEZ9tlU4kNnxWiyviC.KUEXWIHxfZaY1TAkpS.cj2Z1FY37() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code
Exception in Task: System.Runtime.InteropServices.COMException (0x800A07D1): You canceled the previous operation.
at Microsoft.Office.Interop.Access.DoCmd.RunMacro(Object MacroName, Object RepeatCount, Object RepeatExpression)
at gEZ9tlU4kNnxWiyviC.KUEXWIHxfZaY1TAkpS.cj2Z1FY37() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code



With credentials local login and load profile:

Exception in Task: Non zero exit code
Exception in Task: Exception in Task: Non zero exit code
Support
2014-02-12T14:54:35Z
I think there is a quit command or similar in your script, could that be the case?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2014-02-12T15:23:16Z
Yes there is:


Public function quit ()
DoCmd.quit
End Function


We Think it has been there all the time, do we need to remove it or should it be replaced with something else?

Support
2014-02-12T15:49:09Z
Originally Posted by: dsjere 

Yes there is:


Public function quit ()
DoCmd.quit
End Function


We Think it has been there all the time, do we need to remove it or should it be replaced with something else?



Please remove it.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2014-02-13T15:16:36Z
I'm sorry to say that it still doesn't work. Even without the quit command.

About a year ago we had a similsr problem with the topic "Executing Office Macro Task" in the forum.

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

Do you need any more input from me?

Best regards.

/Jesse
Support
2014-02-13T15:26:09Z
Is it possible to test this latest version?

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

This version gives a lot more information in output and error output columns.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2014-02-13T16:16:43Z
It didn't work.

It seemed to work fine but it didn't produce anything.

I tried with and without the "quit command" and with and without "loading profile"

The log below also say that id worked fine...

/Jesse

Is 64 bit process: True
Is 64 bit operating system: True
Current user: LFAD\SYSTEM
.NET version: 4.0.30319.1008
AddExceptionHandlers
AddAssemblyLoadEvent
Argument(0): 13836
CreateTaskServiceChannel
CreateTaskServiceChannel->Complete
pts.CreateService(UniqueAddressId)
pts.CreateService(UniqueAddressId)->Complete
16:56:26: Server->Execute path: C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe
16:56:26: Server->Executing Task process
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Assembly loaded: System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->CreateService->Response channel created on address: /TaskProcess/13836
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Requesting Task information
16:56:26: Server->Sending Task information
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Task information sent
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Assembly loaded: System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Task information received
16:56:26: Server->Task information sent
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Before execute
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->RunMacro->OfficeApplicationType: Access
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->RunMacro->Parameter count: 0
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->RunMacro->Done
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Preparing Task log
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Sending result
16:56:26: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskOfficeMacro.exe" 13836)->Result sent
16:56:26: Server->Executing Task process exited with exit code: 0
16:56:26: Server->Waiting for completion and result
16:56:26: Server->Task result received, success: True
Support
2014-02-13T16:22:22Z
What does your script do exactly? Any way to reproduce it here?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2014-02-13T16:32:09Z
Below is the code.

I'm not a developer so I can't explain what it does in any other way.


Option Compare Database

Public Const d = "\\Server\folder\Folder\"
Public Const FTP_dir = "\\Server\folder\Folder\"
Public Const batchlog = "\\Server\folder\Folder\"
Option Explicit

Public Function do_dir()
On Error GoTo LError
Dim a As Variant
Open batchlog + "XXXXXXX" + CStr(Date) + ".log" For Append As #3 Print #3, "Start: " + CStr(Now())

a = Dir(d + "*_XXXXX*.tmp")
If Not a = "" Then Call do_file(a) Else GoTo LExit
Nxt: a = Dir
If Not a = "" Then Call do_file(a) Else GoTo LExit GoTo Nxt
LExit:
Print #3, "End: " + CStr(Now())
Close #3
Exit Function
LError:
Print #3, "Error: " + CStr(Err.Number) + " " + Err.Description
Resume LExit
End Function

Public Function do_file(a_tmp As Variant) Dim rec, a_txt As String Print #3, (a_tmp + " to be handled") a_txt = Left(a_tmp, Len(a_tmp) - 3) + "txt"
Open d + a_tmp For Input Access Read Lock Write As #1 ' Open file.
'If EOF(1) Then GoTo Empty_File
Open d + a_txt For Output As #2 ' Open file.
' Open file for output.
Do While Not EOF(1) ' Loop until end of file.
Line Input #1, rec
rec = Replace(rec, """", "")
Print #2, rec

Loop
Print #3, (a_txt + " created.""'s removed") Close #2
'Empty_File:
Close #1
Call distrib_file(a_txt, a_tmp)
End Function


Function distrib_file(a_txt, a_tmp)
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
fs.copyfile (d + a_txt), d + "history/"
Print #3, (a_txt + " copied to history catalog")

fs.copyfile (d + a_txt), FTP_dir
'COMMENT to PREVENT COPY IN TEST'

Print #3, (a_txt + " copied to FTP catalog") 'fs.copyfile (d + a_txt), "X:\Folder\Folder\Folder"
fs.deletefile (d + a_txt)
Print #3, (d + a_txt + " deleted")
fs.deletefile (d + a_tmp)
Print #3, (d + a_tmp + " deleted")
End Function


Public Function quit()
DoCmd.quit
Support
2014-02-13T19:46:38Z
There seems to be a log file that it produces, have you looked at that?

Also, you seem to work with a files located on a network drive. Then you may need a Credential for accessing that drive, perhaps a user on that remote server. Credentials should be used with options (Local logon = false).
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2014-02-18T08:19:00Z
Well, it doesn't produce the log file since the macro isn't starting.

I have tried both with loading the profile and not loading the profile.

The result in both cases is in the top of this topic.

/Jesse
Support
2014-02-18T08:23:32Z
Originally Posted by: dsjere 

Well, it doesn't produce the log file since the macro isn't starting.

I have tried both with loading the profile and not loading the profile.

The result in both cases is in the top of this topic.

/Jesse



I am thinking about the std out and std error. Should be content there.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2014-02-18T08:30:32Z
There is no content in std output and in stderr output ther is the text I posted above.

/Jesse
Support
2014-02-18T08:44:34Z
Could you create a simple macro with your Office that has no external dependencies, something that we can test with. Also, please give us your macro name and any parameters. Please send it to support@visualcron.com. Thanks!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
bbusse
2014-03-20T14:08:20Z
When we first installed a new install of 7.1.1 on a brand new 2008 R2 server, a group of people wanted to do some office macro tasks using Access. Access 2010 is what we were using, along with Outlook 2010 as well. We had multiple issues, none of which were VisualCron related specifically. One thing to note, we do not run the VisualCron service as 'Local System' which is the default. We run it as a domain account that is a local administrator on the machine. That way basic tasks do not need a credential, unless the profile loading is required. What we had to do, was log into the server as the user/credential configured on the tasks and open up Access and enable macros, etc.. Those settings are unique to the user (profile), and then we had to reboot. Restarting the service wasn't good enough. Once rebooted, the task would run if you had it set to load profile with the credential.

The errors you showed regarding Office not being installed (paraphrasing) were exactly what we were getting.

Brian
Support
2014-04-25T12:37:04Z
Scroll to Top