0

I have to pass multiple arguments in my .vbs script but the problem is the script does not get executed from windows task schedular if I pass multiple arguments separated by white spaces. I am running the script like below,

cscript//nologo D:\test\CPWinOraBackup0.100.vbs test_db D:\Oracle\WINDOWSX64_193000_db_home rman_hot D:\Oracle\DB_Backup\test_db 1> D:\test\test.log

where the syntax is as below,

cscript//nologo Script_path ORACLE_HOME Backup_type Backup_directory retention_day

Thank you for your help in advance!

CKP

  • What version of Windows are you using? How are you creating the scheduled tasks? Why don't you just put the 'arguments' in the 'arguments' field in the create-task wizard? – david Jan 09 '23 at 04:50

1 Answers1

-1

Try using brackets for multiple arguments.

  cscript//nologo "D:\test\CPWinOraBackup0.100.vbs test_db D:\Oracle\WINDOWSX64_193000_db_home rman_hot D:\Oracle\DB_Backup\test_db 1> D:\test\test.log"

If that does't work, try using a batch script.

@echo off
cscript//nologo "D:\test\CPWinOraBackup0.100.vbs test_db D:\Oracle\WINDOWSX64_193000_db_home rman_hot D:\Oracle\DB_Backup\test_db 1> D:\test\test.log"

How to create a batch script on Windows

Vamp
  • 1
  • 1
  • Thanks Vamp for the suggestion. The batch script also did not help. – Chandra Pat Jan 10 '23 at 05:53
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 10 '23 at 20:36