#1
|
|||
|
|||
Job Scheduler Problem
Hi all,
I am having a problem with using the job scheduler on a WIN2003 server. I have the following command: cd "c:\program files\securefx\" sfxcl.exe /Log c:\bcbs\send\bcbslog.txt c:\bcbs\send\mirout1 sftp://username ![]() This runs fine if I put this into a command line or a batch file and run the batch file from a command line. Th problem comes when the command is run from the scheduler. There is no indication of a problem, just the just finishes in about 2-3 seconds. No log file is created/updated and no error codes are generated. Has anyone come across this? I am logged on to the server and run the job with full authority. Thanks in advance, George |
#2
|
||||
|
||||
Hi George,
It is difficult to state for certain what may be happening since a log is not produced. However, I suspect that the issue is that SFXCL cannot find a configuration folder and therefore cannot run the command. When SFXCL is run from a scheduled task in Windows, it is most likely being run as a different user then yours. This user most likely does not have a SecureFX configuration folder created for their profile. This can be resolved by using the '/F' command line option for SFXCL that specifies a configuration folder to use. An example of this would be: sfxcl.exe /F C:\myconfig /Log c:\bcbs\send\bcbslog.txt c:\bcbs\send\mirout1 sftp://username:mypassword@remoteftp.com/home/providers/zx00413/PROD_MIR_from_the_Fund Does adding this command line option allow the scheduled task to run?
__________________
Thanks, Teresa Teresa Nygren |
#3
|
|||
|
|||
What should the contents of this config file (C:\myconfig) be?
George |
#4
|
||||
|
||||
Hi George,
The 'myconfig' folder should be the location of SecureFX's configuration folder. SecureFX records the location of this folder in the 'Configuration folder' data field in the 'General' category of the 'Global Options' for SecureFX 3.x and higher. This is often located in a user's profile. If the account running the scheduled task does not have access to the current location of the configuration folder, a copy of it can be made to a new location and SFXCL will be able to user that new folder. Does this help?
__________________
Thanks, Teresa Teresa Nygren |
#5
|
|||
|
|||
No...there was no change. I used the /F to point to the Admin config folder and I even copied the Admin config folder to the users folder and still no change.
One odd thing is...I put some intentional invalid information in the command invalid switch (sfxcl.exe /DSDSDS) invalid data (sfxcl.exe /F c:/nofile) I did not receive one error when the job ran from the scheduler. I dont know if this means anything. George |
#6
|
||||
|
||||
Quote:
One thing you might consider is redirecting stdout/stderr to a log file so that you can find out what errors (if any) are being returned by the system when you attempt to run the .bat file within the scheduler. For example, if I were scheduling a batch file named "MyBatchFile.bat" to be launched from the windows scheduler, I'd put this in the "Run" field of the properties screen for the scheduled task in the windows scheduler: cmd /C C:\MyBatchFile.bat >> C:\MyScheduledTaskRunLog.txt 2>&1If you do this in your scheduled task setup, does a "C:\MyScheduledTaskRunLog.txt" file get created? If so, what clues does it provide as to what's going wrong? --Jake
__________________
Jake Devenport VanDyke Software Technical Support YouTube Channel: https://www.youtube.com/vandykesoftware Email: support@vandyke.com Web: https://www.vandyke.com/support |
#7
|
|||
|
|||
Scheduled Task log
The Windows scheduler also logs information about a scheduled job, including any errors it encounters, to a separate file. The log can be viewed from the Scheduled Tasks page. Click on the "Advanced" menu option and select "View Log". Does this log give any indication of what is wrong?
Chris |
#8
|
|||
|
|||
Jake - I am going to try what you suggested today and will post the results.
Chris - The Job Scheduler log shows the job ran in about 4 secords with an error code of 0. |
![]() |
Thread Tools | |
Display Modes | |
|
|