![]() Topic awaiting preservation: Help Help! Need to remake registered task script to download emaisl from imap server to mysql db (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: you tell me |
![]() Help guys! My old idea of using a php page that downloads emails from the online imap server into our db and refreshes constantly is clumsy and backfires every now and then. I need to remake this stupid script again. I tried making a bat file which would call iexplorer to open the download script but for some damn reason the bat file isn't called periodically and teh stupid scheduled task thing just skips calling it now and then. |
Paranoid (IV) Inmate From: Florida |
![]() Sorry, what do you need these email addresses for? |
Bipolar (III) Inmate From: you tell me |
![]() Not email addresses - let me rephrase what I was saying. We have an imap server - we have a php script that connects to the imap server and downloads all emails - note emails not email addresses - emails belonging to one address in a mailbox and serializes the contents as objects and enters them in a database. Well the script works fine but the thing is that we nee dto fix up a fool proof method to run this script on a periodic basis. We tried making a batch file and opening IE from that file calling the script within it. However for some reason the scheduled task dies out on us for some reason. |
Paranoid (IV) Inmate From: cell 3736 |
![]() |
Maniac (V) Inmate From: there...no..there..... |
![]() I asked you a couple of questions the last time and they went unanswered. Let me ask again. |
Bipolar (III) Inmate From: you tell me |
![]() Hmm must have skipped my mind - sorry bout that. Well the code is kinda like this below - I have a vbs file and a bat file which calls the vbs file: code: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ ("Select * from Win32_Process Where Name = 'iexplore.exe'") isbusy = 0 IE = false Set oShApp = CreateObject("Shell.Application") For Each oWin In oShApp.Windows t = TypeName(oWin.Document) On Error Resume Next IE = 1 Err.Clear If t = "HTMLDocument" Then Set IE = oWin Exit For End If Next if IE <> false then if IE.busy then isbusy = 1 end if end if if isbusy = 0 then For Each objProcess in colProcessList objProcess.Terminate() Next Set WshShell = WScript.CreateObject("WScript.Shell") Return = WshShell.Run("iexplore.exe http://localhost/modules/download.php", 1) end if
code: start closeIE.vbs cls exit
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() chances are it's still running and that's why the task schedulder doesn't start it again... |
Bipolar (III) Inmate From: you tell me |
![]() Hmm well I'm thinking of trying to get rid of use for IE for this - using IE was just a monkey wrench solution until we figured something concrete - seems it didnt last as long as we were hoping. Need to then fix up my download script to be run from command line then - however is there anything I need to change in coding in order to run it successfully on teh command prompt. |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() you have long ago worn out my glass ball, parity. |
Maniac (V) Inmate From: there...no..there..... |
![]() look at the log for the task scheduler for errors. |
Bipolar (III) Inmate From: you tell me |
![]() Well what kind of further information should I post btw |
Maniac (V) Inmate From: there...no..there..... |
![]() quote:
|
Paranoid (IV) Inmate From: cell 3736 |
![]() parity did you try wget? |
Bipolar (III) Inmate From: you tell me |
![]() Great lemme try these out |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() How about the bloody actual error messages you get when running your script on the command line? |
Maniac (V) Inmate From: there...no..there..... |
![]() quote:
|
Bipolar (III) Inmate From: you tell me |
![]() Ok I fixed it YIPPEEEE |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() cron jobs are usually available when you rent dedicated hosting... how new are you in this business, actually? |
Bipolar (III) Inmate From: you tell me |
![]() Umm well I've been developing for over 5 years - however I'll be honest with you - I havent registered a simgle domain or web host so far |