Discussion:
[blat] Blat doesn't send email when run from Windows scheduler
Jamilur_rahman@yahoo.com [blat]
2018-06-17 03:22:48 UTC
Permalink
Can you please help me on a BLAT issue ? I have a batch file where I use BLAT utility to send emails using SMTP server. When I run same batch file from a dos shell manually, the email is sent properly. But when I schedule the batch file to run from Windows task scheduler, the BLAT doesn't send any email.
I am using Windows 7 and the BLAT version is:
Blat v3.2.19 (build : Nov 18 2017 03:14:35)
32-bit Windows, Full, Unicode
'Chip' chip.programmer@att.net [blat]
2018-06-17 04:13:54 UTC
Permalink
Post by ***@yahoo.com [blat]
Can you please help me on a BLAT issue ? I have a batch file where I use
BLAT utility to send emails using SMTP server. When I run same batch file
from a dos shell manually, the email is sent properly. But when I schedule
the batch file to run from Windows task scheduler, the BLAT doesn't send
any email.
Blat v3.2.19 (build : Nov 18 2017 03:14:35) 32-bit Windows, Full, Unicode
My first guess is that Blat is not in your search path, and that you might
need to specify the full path to blat.exe in your task scheduler, plus the
full path to any files being used.

My second guess is that you do not have the SMTP server configuration saved
for all users to access in the registry. When Windows scheduler runs, it
may run as the user account named "administrator" rather than as you. If
you stored the Blat server configuration using the -hkcu option, or if Blat
was forced to store the information under the registry tree
Computer\HKEY_CURRENT_USER, then this information may not be available to
the Blat invocation from Windows scheduler. This can be checked by opening
regedit.exe, and searching for "Public Domain". Ideally, you want to find
"Public Domain" listed under
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node (if using 64-bit Windows),
or Computer\HKEY_LOCAL_MACHINE\SOFTWARE (if using 32-bit Windows).

If you need to use 3rd party services for SSL/TLS encryption, such as
stunnel from stunnel.org, then make sure this 3rd party service is always
running. If it is not running when your schedule task begins, then this
would prevent Blat from running.

Chip
Jamilur_rahman@yahoo.com [blat]
2018-06-25 13:35:56 UTC
Permalink
"My first guess is that Blat is not in your search path, and that you might
need to specify the full path to blat.exe in your task scheduler, plus the
full path to any files being used."

Hello Chip:
First of all my apology for delayed response due to my sickness.


You are right, when I used 'absolute' path of the blat install and other data files, it is working from Task Scheduler. I think, for some reason Windows Task Scheduler needs 'absolute' path of any object it would interact with. Manual run (from command shell) doesn't have this issue because I have set the path in the environment variable.


Thanks for your great hint, it was helpful.


/jamil

'Skand Bhargava' skand@softoolsme.com [blat]
2018-06-17 04:21:10 UTC
Permalink
What does the Scheduler Log say?

Under "Run As", have you selected user and entered correct password for the scheduled job?

Are you executing the job using the same batch file that runs successfully or have written one line command within the scheduled job itself?

Using the same scheduled job, have you tested successful run of some other batch file which has a simple command like "DIR > x.txt" ?

Have you given full path name of blat.exe?

Skand

Regards,

Skand Bhargava
TAS2000 & HR2020: Serious Attendance & HR Systems



-----Original Message-----
From: ***@yahoogroups.com [mailto:***@yahoogroups.com]
Sent: Sunday, June 17, 2018 7:23 AM
To: ***@yahoogroups.com
Subject: [blat] Blat doesn't send email when run from Windows scheduler




Can you please help me on a BLAT issue ? I have a batch file where I use BLAT utility to send emails using SMTP serve r. When I run same batch file from a dos shell manually, the email is sent properly. But when I schedule the batch file to run from Windows task scheduler, the BLAT doesn't send any email.

I am using Windows 7 and the BLAT version is:

Blat v3.2.19 (build : Nov 18
2017 03:
32-bit Windows, Full, Unicode
Loading...