Hi All,
I am currently using a Windows 2003 server to send out reports and perform other tasks.
These are primarily VBscript programs which I am executing using wscript and are all setup as scheduled tasks. These have been working away fine for years.
However, as Windows Server 2003 is now end of life I am trying to move all these scheduled tasks to a Windows 2012 server. However, I am finding that the tasks will not send out emails when scheduled but they will send emails when I run them manually. I have setup a simple test script to just send an email:
set objCDO = CreateObject("CDO.Message")
objcdo.to = "me@mymail.com"
objCDO.From = "me@mymail.com"
objCDO.Subject = "Email Test"
objCDO.HTMLBody = "This is a test - " & Now()
objCDO.SEnd
set objCDO = nothing
I also setup a simple batch file to run this:
wscript.exe "S:\scripts\Once Off reports or scripts\EmailTest1.vbs"
I run the batch file manually and it works no problems - email is sent
When I create a schedule task to run the batch file and set it to run as the same user (the one I am logged in as), tasks scheduler says the task has run but no email is sent.
Can anyone please offer some advice on this.
Mighty
I am currently using a Windows 2003 server to send out reports and perform other tasks.
These are primarily VBscript programs which I am executing using wscript and are all setup as scheduled tasks. These have been working away fine for years.
However, as Windows Server 2003 is now end of life I am trying to move all these scheduled tasks to a Windows 2012 server. However, I am finding that the tasks will not send out emails when scheduled but they will send emails when I run them manually. I have setup a simple test script to just send an email:
set objCDO = CreateObject("CDO.Message")
objcdo.to = "me@mymail.com"
objCDO.From = "me@mymail.com"
objCDO.Subject = "Email Test"
objCDO.HTMLBody = "This is a test - " & Now()
objCDO.SEnd
set objCDO = nothing
I also setup a simple batch file to run this:
wscript.exe "S:\scripts\Once Off reports or scripts\EmailTest1.vbs"
I run the batch file manually and it works no problems - email is sent
When I create a schedule task to run the batch file and set it to run as the same user (the one I am logged in as), tasks scheduler says the task has run but no email is sent.
Can anyone please offer some advice on this.
Mighty