|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
rlevine
Joined: 05 Jul 2011 Posts: 13 Country: United States |
|
vb script error: Missing ; before statement |
|
I am band new to this 24X7 scheduler.
I just downloaded a trial version and am trying to set up my first job.
It is a simple ftp pull job, where I want to pull all files from an FTP site to local network.
I created an job using the FTP download (using file mask) template and when I try validating the script, I get this error.
"Line 7: missing ; before statement"
No matter what I tried I can't get it to compile.
I did notice, that I can't run a simple vbscript either. I am running this on a Windows 2008 64 bit machine.
Any help is greatly appreciated.
|
|
Tue Jul 05, 2011 8:06 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7854
|
|
|
|
As far as I remember "FTP download (using file mask)" template is for JAL jobs, not VBScript. There is also similar template for JavaScript.jobs.
Just in case JAL = Job Automation Language, which is one of the scripting engines supported by 24x7.
Also, are you using 24x7 Windows-only Edition (that one will be decommissioned later this year) or 24x7 Multi-platform Edition?
|
|
Tue Jul 05, 2011 8:51 pm |
|
|
rlevine
Joined: 05 Jul 2011 Posts: 13 Country: United States |
|
|
|
I thought it was vb script only b/c when looking at the script it had the Dim statements at the top of the script. Either way, whatever it is, it doesn't work. I am not using the Windows specific platform, I am using the Automation Suite (still trying to determine the difference between this and the regular scheduler) for cross platform support, but running it on Win 2008 server.
|
|
Tue Jul 05, 2011 10:15 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7854
|
|
|
|
There is got to be some syntax error as a result of your input. Please post the complete script here, mask sensitive data like user/password with asterisks.
|
|
Wed Jul 06, 2011 8:22 am |
|
|
rlevine
Joined: 05 Jul 2011 Posts: 13 Country: United States |
|
|
|
That is a pretty un-comforting suggestion, as I had created the script using the template installed together with the installation.
Below is the script (I removed all the sensitive data elements).
Thank you for your help!
////////////////////////////////////////////////////////////
// 24x7 Scheduler Multi-platform Edition Version 4.4 Build 331
// Job Template: FTP download (using file mask)
// Generated on Sun Jul 03 02:29:30 EDT 2011
////////////////////////////////////////////////////////////
Dim file_list, string
Dim short_file_name, string
Dim ftp_file_name, string
Dim local_file_name, string
Dim no_more, boolean
// Search files on FTP server.
FTPDir "ftpt.someftpsite.net", "myftpusername", "myftppassword", "/parentPath/pullfrompath/*.TXT", file_list
isEqual file_list, "", no_more
IfThen no_more, DONE
// Download file(s) from FTP server.
LoopUntil no_more, END_LOOP
GetToken ",", file_list, short_file_name
Concat "/parentPath/pullfrompath/", short_file_name, ftp_file_name
Concat "\\\\myservername\\parentpath\\TestFolder\\", short_file_name, local_file_name
FTPGetFile "ftpt.someftpsite.net", "myftpusername", "myftppassword", ftp_file_name, local_file_name
// to delete the file after sucessful downloading uncomment the following line
// FTPDeleteFile "ftpt.someftpsite.net", "myftpusername", "myftppassword", ftp_file_name
isEqual file_list, "", no_more
END_LOOP:
DONE:
|
|
Wed Jul 06, 2011 1:45 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7854
|
|
|
|
Hello. The script looks fine and I can run it. Of course the FTP connection fails, but that's not what you get.
Please tell me what you got for this job in the Job Wizard step 2. What type of script is assigned to the job? If it is not JAL, set it to JAL.
|
|
Wed Jul 06, 2011 4:23 pm |
|
|
rlevine
Joined: 05 Jul 2011 Posts: 13 Country: United States |
|
|
|
how can I see the type of script now?
|
|
Wed Jul 06, 2011 5:51 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7854
|
|
|
|
1. Start 24x7 scheduler in GUI mode
2. Double-click the job to open it in the Job Wizard
3. Click the Next button to advance to step 2
4. Check the value of Script Language drop-down
|
|
Wed Jul 06, 2011 7:02 pm |
|
|
rlevine
Joined: 05 Jul 2011 Posts: 13 Country: United States |
|
|
|
Ok, perfect!
That was the issue.
Apparently by default the script type checkbox is set to Javascript. Once I changed this, this worked.
Thank you for your help!
|
|
Wed Jul 06, 2011 7:23 pm |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|