Jump to content

Burr

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Burr

  1. Hello, Moving clients over to a new server and implementing NAT Routing on Server 2012R2. At first couldn't get to FTP stuff at all, then found how to disabled FTP Proxy from the NAT. From a client of the server; I can get to and see the files on the FTP, drag and drop them to the local client with no issues. If I plug the client into another network without NAT the script works fine. The script also will not work form the new server (the one with the NAT) either. I don't get why the script is failing after I disabled FTP Proxy (netsh routing ip nat delete ftp). The script will ping, I can _FTP_FindFileFirst with no problem, just can seem to download/get a file. InetGet doesn't work either. Ideas? Thanks
  2. Woot! that did it. My guess maybe adding the password in was the key. But got the mail no problem this morning. I'll try to strip it down to plug into my script, maybe see exactly what it is. Cheers
  3. Ok, so the script fired at the new time. Preformed the backups, but did not send the mail. So it seems if it sits hours its doesn't send the mail. I have the screen saver turned on after 15 min, then monitor go off 5 minutes later. For testing I screen saved in 2 minutes, and monitor off in 4. So the conditions I would think would be the same as they are at 4am. I do not have the machine go to sleep, nor hibernate, nor do the HDs spin down. Aside from all that, we are a 24 hour company, 3~5am the slowest time, but the server/HDs where the script fires is accessed all the time from client shares. Sorta clueless.. Ideas? Edit: I just pulled the error report from last nights back up. The _INetSmtpMail reported an error of 51. Help says: "5x - Cannot open SMTP session. x indicates the index number of last command issued to the SMTP server." Forgive my ignorance, so I read this as an opening error on index 1... Whats that mean? = Thanks
  4. -$Response returns 1 (Success) but the mail worked at this point, read on... -Tool Tips DO NOT appear when run from task scheduler -error.log reports 0 errors The Plot thickens... Here's the clincher,,, When fired from task scheduler for testing, the mail worked while I sat there and watched, go figure... So maybe something when the machine is inactive for a bit. I never have the machine go to sleep or hibernate. Only screen saver and monitor shut down. So I tested further. When run from Task Scheduler and screen saver on, mail worked. When run from Task Scheduler and screen saver on and monitor asleep, mail worked. Now I'm Confused... Everything is the same except I bump the time so I can test it, so I'm going to change the time from 5am to 4am, just to see what happens. I will let it run the weekend and report back on Monday. But as of right now I can't duplicate the problem... Thanks all for the help
  5. Sorry about that, I didn't think the code would be helpful since it works fine when manually clicked. But here it is, please pardon the sloppiness #include <Date.au3> #include <INet.au3> ;Make Todays Date $tTime = _Date_Time_GetSystemTime() $aTime = _Date_Time_SystemTimeToArray($tTime) Global $Month = $aTime[0] Global $Day = $aTime[1] Global $Year = $aTime[2] Global $FolderDate = $Month&"-"&$Day&"-"&$Year Global $s_SmtpServer = "mail.FooBar.com" Global $s_FromName = "Backup Script" Global $s_FromAddress = "info@FooBar.com" Global $s_ToAddress = "brian@FooBar.com" Global $Fail = "" Global $Folder = "" Global $FreeSpace = Round ((DriveSpaceFree( $Folder )/1000),2) Global $Databases = "C:\Data 8-2012\" Global $Rolodex = "\\ALYSON\Database BUs\" ToolTip("Preparing for Database Back up",300,1,'Daily Back up',1) Sleep(1000) ALYSON() Func ALYSON() $Folder = "\\ALYSON\Database BUs\" $FreeSpace = Round ((DriveSpaceFree( $Folder )/1000),2)&" GB" ToolTip("Preparing for Database Back up"&@CR&"Backing up to ALYSON"&@CR&"Free Space: "&$FreeSpace,300,1,'Daily Back up',1) Sleep(1000) ;MsgBox(4096, "Free space on :"&$Folder, $FreeSpace & " GB",10) $Copy = FileCopy($Databases&"*.*",$Folder&$FolderDate&"\*.*",8) If $Copy = 1 Then ;MsgBox(0,"Success","Copied "&$Copy,10) ToolTip("Preparing for Database Back up"&@CR&"Backing up to ALYSON"&@CR&"Free Space: "&$FreeSpace&@CR&"Back up Successful",300,1,'Daily Back up',1) MailSuc() ToolTip("Preparing for Database Back up"&@CR&"Backing up to ALYSON"&@CR&"Free Space: "&$FreeSpace&@CR&"Back up Successful"&@CR&"Mail Sent to "&$s_ToAddress,300,1,'Daily Back up',1) Sleep(1000) Else ;MsgBox(0,"Fail","Fail "&$Copy,10) ToolTip("Preparing for Database Back up"&@CR&"Backing up to ALYSON"&@CR&"Free Space: "&$FreeSpace&@CR&"Back up Failed",300,1,'Daily Back up',2) MailFail() ToolTip("Preparing for Database Back up"&@CR&"Backing up to ALYSON"&@CR&"Free Space: "&$FreeSpace&@CR&"Back up Failed"&@CR&"Mail Sent to "&$s_ToAddress,300,1,'Daily Back up',2) Sleep(1000) EndIf EndFunc Func MailSuc() $s_Subject = "Back Up Summary" Dim $as_Body[3] $err = @error $as_Body[0] = "Copy to "&$Folder&$FolderDate $as_Body[1] = "Driver Free Space "&$FreeSpace $as_Body[2] = "Back Up was Good!" $s_helo = "info@FooBar.com" $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) $err = @error EndFunc Func MailFail() $s_Subject = "Failed Back up" Dim $as_Body[2] $err = @error $as_Body[0] = "Failed Copy to "&$Folder&$FolderDate $as_Body[1] = "Driver Free Space "&$FreeSpace&" "&$err $s_helo = "info@FooBar.com" $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) EndFunc I am running it with Admin rights from an Admin login and it is saved in Task Scheduler with the Admin password. Its just the mail portion that wont work from the Task Scheduler side. Same Script fired manually will function normally. Thanks
  6. Greets all, Got an oddity with my back up script. I have it backing up a few folders to another drive on the network each day around 5am. The script does its job partly, I have it sending a mail to me that is was successful of failed. It should send a mail every day regardless. The problem is, when the task scheduler (Win7) fires it off at 5am the mail doesn't send, the folders get backed up, but no mail. Further, if I fire it off manually, the mail sends as designed. I leave the machine logged in, so conditions are the same weather fired by task scheduler or manually. Ideas?
  7. This a stumper? Should I try to find another way? Thanks
  8. Greets all, first time posted, long time Autoit Fan (doesn't mean I'm anywhere good at it) I searched the forums, found lots but nothing concrete on what I need to do. Sorry if I mssed it and its a repost. I need to get our tracking/messaging application to carry Job info and address to the proper truck. I'm as far as getting the info in the right fields in th right webpage, but the trucks are listed in a table that will shift order depending whos closest. Heres HTML of 1 row <tr onclick="return onGridRowClick(&#39;2146565&#39;,&#39;grdVehicles_rdoOne_0&#39;)"> <td style="width:20px;"> <input id="grdVehicles_rdoOne_0" type="radio" name="grdVehicles$ctl02$actin" value="rdoOne" /> </td><td style="width:20px;"> <img id="grdVehicles_imgGarminConnected_0" src="../../App_Themes/Default/img/icon_GarminOff.png" /> </td><td class="tblHiddenField">2146565</td><td>T10</td><td style="width:90px;"> <span id="grdVehicles_lblVehPositionType_0" class="vehshutdown">[Shutdown]</span> </td><td> <span id="grdVehicles_lblLocation_0">150 Woodview Dr, Elgin, USA</span> </td><td> <span id="grdVehicles_lblPosTime_0">02/22/2012 01:23 PM</span> </td><td> <span id="grdVehicles_lblMisc_0"></span> </td> </tr> T10 is the Truck Label I need to send to (for this example) The <name="grdVehicles$ctl02$actin> Pretty sure stays with the row, so I need to pull out the "T10" somehow. The whole table row is clickable, I just need to figure out how to identify the right row per Truck Number that will shift postition in the sort order given its postion to the job address. I'll drop a screen shot of the page seeing that its a secured site. Thanks for any help
×
×
  • Create New...