Tag Archives: Command prompt

Batch file running on command prompt but not in Microsoft window scheduler

Batch file running on command prompt but not in Microsoft window scheduler

Microsoft Scheduler not run the Scheduled task .bat file but working fine manually run.

I am created a job for rman backup scheduled and created bat file to execute it in Microsoft windows Scheduler. On running the .bat file manually it’s running successfully.
But when I scheduled it with windows scheduler its not running actually finished in 1 seconds as shown in windows scheduler history.

Followings all the steps I performed to solve my problem. I would guess that maybe some of these face same problem.

Solution:

1) Open the Task Scheduler of Microsoft Windows.
2) On General Tab, make sure the task is set to “configure for Windows Vista or Windows 2008” on the first page of the task properties.
3) On Action Tab, Open the Task Properties by click on “edit” Button at bottom, need to set the “start in” field with the folder location where the batch file located.
In the “Edit Action” Window there is a field for “start in (optional)” that you set to the path to the batch file.
Example:
D:\scripts\rman.bat is the my file for rman backup , then set “Start in (optional)” with D:\scripts value.
4) Make sure that the task is running as an account that has explicit “Full access” permissions to all these things: The .bat file itself, the folder containing the .bat file, and the target files/folders that are affected by the .bat script. Inherited permissions didn’t seem to work for me.
5) Make sure that the account running the task is a member of the local “administrators” group for this machine.
5) Make sure that the task is set to “run whether logged on or not”
6) The Task should run successfully with expected output when you right-click on the task and select “run”
If it does that then it will run successfully when you are logged off.

Advertisements

CHCP on command prompt for accept different languages

CHCP is setting active code page on the command prompt to display different language or accept different language temporary

Displays or sets the active code page number.

CHCP Specifies a code page number.

Type CHCP without a parameter to display the active code page number.

274 - Brazil
275 - Brazil
442 - Bulgaria
319 - Greece
161 - Iceland
118 - Macedonia, Serbia, and Montenegro
333 - Romania
441 - Russian
437 - United States
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
860 - Portuguese
863 - Canadian-French
865 - Nordic
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
857 - Turkish
861 - Greek
437 - United States
850 - Multilingual (Latin I)
852 - Slavic/Eastern European
855 - Cyrillic I
866 - Russian (Cyrillic II)
861 - Icelandic
866 - Russian
869 - Modern Greek
1252 - West European Latin
65000 - UTF-7 *
65001 - UTF-8 *