Are you running the scheduled task on a pc or some sort of server? I've never been able to get Task Scheduler to work on a PC; for me the code was bullet proof but the failure is in task schedular.
Looking at one of your scripts, everybody has their own style of doing things. I would run it as one script and make each of the individual scripts a def() that is called by main(). I don't see anything wrong with your code per se. Below is what we use as a basic template for our python scripts. Each geoprocessing def() has only one except to one try. We print to the log file no matter what happens, success or failure.
#TEMPLATE to send error emails automatically
#TEMPLATE to insure correct error trapping automatically
#SEE END OF SCRIPT FOR STARTING POINT CODE
# <<<<<<<<< CONFIG SETTINGS TO BE ENTERED BY TEMPLATE USER
# sample imports
import arcpy
import sys
import os
import smtplib
# sample script level variables/paths <<<<<<<<<<<HERE
samplePath = r"\\somePath\arcgisresources\common\geocode\backupLoc"
samplePath2 = r"\\somePath\arcgisresources\common\geocode"
# sample init HERE
arcpy.env.overwriteOutput = True
def sendEmail(errMessage): # if errors send email
from_addr = "errors@slco.org"
to_addr = ["IS-GISDL@Something.org", "customerEmail@SOmething.org"] # <<<<< ENTER CUSTOMER EMAIL HERE
subject = "Errors: ERROR DESCRIPTION HERE" # <<<<<<< ERROR DESC HERE
msg_text = errMessage
msg = "From: %s\nTo: %s\nSubject: %s\n\n%s" % (from_addr, to_addr, subject, msg_text)
server = "SomeEmailServer.org"
server = smtplib.SMTP(server)
server.sendmail(from_addr, to_addr, msg)
server.quit()
# FUNCTIONS HERE
def functionName(parameter1, parameter2, etc):
try:
#<<<<<<<<LOGIC HERE
print "Success: DESCRIPTION HERE will display in log file"
except Exception as err:
print err
sendEmail(err)
# MAIN FUNCTION HERE
def main():
# start log file HERE
logFile = r"E:\scripts\locators_recreate_publish\logs\locators recreate publish.log" #<<<<<<<<<< INSERT LOG FILE PATH HERE
logoutput = open(logFile,'w')
beginTime = time.strftime('%Y-%m-%d %H:%M:%S')
logoutput.write("Began at # " + beginTime + "\n")
sys.stdout = logoutput #<<<< POINTS ERROR MESSAGES TO BE RECORDED IN LOG FILE, NOT TO THE PYTHON DEBUG SCREEN
# paths variables <<<<<<<<<<<<HERE
samplePathFOR_DEF_MAIN = r"\\somePath\arcgisresources\common\geocode\backupLoc"
samplePath2FOR_DEF_MAIN = r"\\somePath\arcgisresources\common\geocode"
# SCRIPT LOGIC <<<<<<<<<<<HERE
functionName(parameter1, parameter2, etc)
functionName(parameter1, parameter2, etc)
# close log file HERE
logoutput.write("Ended at # " + time.strftime('%Y-%m-%d %H:%M:%S') + "\n")
logoutput.close()
###end def main
# script start HERE, points python.exe etc to use the def main as a starting point
if __name__ == '__main__': #if def main exists, call it
main() #calls def main
That should just about do it....