Just in case anyone else has this problem, I fixed it. For some reason, even though mailsend.exe was in the same folder as the batch file. I had to add c:\batch\mailsend to the line, instead of just running mailsend and it's parameters. I guess the scheduler was looking for it in the path. I could have probably moved it to the system32 folder to make it work, but this is working and I am going to leave it as is.