[2010-05-17]SchedHandler 3.00 - scheduling application for email (INSTANT EMAIL)

for which system do you like SchedHandler ?

  • WM5

    Votes: 0 0.0%
  • WM6.x

    Votes: 24 77.4%
  • WMP7

    Votes: 1 3.2%
  • Android

    Votes: 6 19.4%
  • other

    Votes: 0 0.0%

  • Total voters
    31
Search This thread

tilleke

Retired Recognized Developer
May 9, 2008
612
67
great work

from a programmer to a programmer... Great work! :)

I have seen that you put in a lot of work in this.

Well done.
 

camro

Senior Member
Apr 20, 2007
1,832
33
I get the following error, no matter if I use SSL/993 or no SSL/143:

Camel:IsConnected
Exception: Either the application has not called WSAStartup, or WSAStartup failed


There's another message in the log window:

!Warning-A02! It was not possible to start the service. No connection could be made because the target machine actively refused it.

The IMAP host is a Cyrus-IMAPd server I maintain and I couldn't spot any connection attempts in the log (Outlook works fine).

Also, what is "Status Port" for?

hello,
im tested now a lot:
at first some questions:
1.) which email servier does you us ?
2.) is the mail server ssl or ssl/tls configured ?
3.) do oyu have an valid cert ins talled or is the mailserver a big one which have an off. cert (like gmail)
my own server haave only a "cacert", where i had to install extra the "root.cert" from cacert.org

yes i know, on imap (143) this doesn't work - not supported yet..
i will try to find a solution also for imap idle on imap port (standard 143 without ssl)

the other thing - i'm also not sure if it is now working on my side, because i installed root cert from cacert or on my mail server cyrus -> there is an option which is:
/etc/cyrus.conf

EVENTS {
# This is required.
checkpoint cmd="ctl_cyrusdb -c" period=30

# This is only necessary if using duplicate delivery suppression.
delprune cmd="ctl_deliver -E 3" period=1440

# This is only necessary if caching TLS sessions.
#camel disable 2009-11-25
# tlsprune cmd="tls_prune" period=1440

and now it is working.

i will try to find out why it works now.

EDIT: the problem was on my side, that i haven't import the cacert certificate from cacert.org (this i had include in my mail server)

now it is working for all diff. types of SSL or SSL/TLS methods.
(the highest prior for me is to fix the imap (normal imap server) support.
of course - using normal imap is not good (because if you have a "man in the middle" then security is gone :(
but anyway - i want to support this.

well and if this base is done, then i will implement:
.) polling per buttton (function perparing for sceduling)
.) time scheduling for polling and imap idle
:)
cu camel
 
Last edited:

camro

Senior Member
Apr 20, 2007
1,832
33
am i blind? where is de DL-link?

sorry, i removed the link, because found some problems to make the whole system unstable.

for now i'm ready with my bugfixing with imapildeservice and it is working for multiple accounts (if ssl or ssl/tls).
if you have an own mailserver (with cacert.org cert), you have to instert the "root.cert" (can be downloaded from cacert.org).

i want now to fix handling to stop service (if service is started from command line directly), that it is possible to:
1.) start imappusherservice.exe directly
2.) start mailhandler -> and then i want to stop this service also.
if i fixed that, then i will upload the version again.

today i'll be at home in 3hrs. and then i will do this and upload it again.
(so think - this will be ~3hr (vienna time).

cu camel
 

kiemlo

Senior Member
May 16, 2009
81
4
hello,
im tested now a lot:
at first some questions:
1.) which email servier does you us ?
2.) is the mail server ssl or ssl/tls configured ?
3.) do oyu have an valid cert ins talled or is the mailserver a big one which have an off. cert (like gmail)
OK, IMAP+SSL is available on my server but I have a self-signed certificate, so... I'll get a valid cert and then try the next version :)
 

LordDeath

Senior Member
Nov 30, 2006
1,202
106
Yesterday with v0.65 i noticed, that the configuration tool can not be closed. After pressing "ok" it disappears, but its process is still running in the background. Starting again the config just makes a new process. After four "MailHandler.exe" processes I killed them and uninstalled the tool.
IMAP pushing worked, but the schedule settings were not working. Bug or didn't you start developing that feature, yet?
 

camro

Senior Member
Apr 20, 2007
1,832
33
Yesterday with v0.65 i noticed, that the configuration tool can not be closed. After pressing "ok" it disappears, but its process is still running in the background. Starting again the config just makes a new process. After four "MailHandler.exe" processes I killed them and uninstalled the tool.
IMAP pushing worked, but the schedule settings were not working. Bug or didn't you start developing that feature, yet?

configuration tool closing belongs to your config what should be done on clicking "OK".
maybe i can change this in my tool to stop mailhandler.exe if clicking on OK. i will take a look.
Scheduler is not yet in place - but soon.
But first the imap idle must be ready without bugs.

and - not happy - but found a big huge bug yesterday, that it could be happen, that the imap idle service start "login X-times to mailserver, and so i almost killed my server, because have no login limit on my server.
i'm tracing whole the night through the code to fix that.
This is why i not upload it again.
you can be sure, that i'm working hard on it to fix the problems on the base of imap idle.

Next, it could be possilbe that i have to redesign the whole project, because i think the base is not imap idle, this is only a piece.

Redesign could be in this order way:

1.) Scheduler Handler (When should the trigger be done)
-> Name of Task
-> Day(s)
-> Starttime
-> Endtime
a) Checking Task (What should be checked / controlled)
---> ReRun (Rechecking Time) (if 0 then run only once at "Starttime", if imap idle is on, then recheck time of socket)
---> "mail imap idle" -> (list of Mailboxes incl. Mailserver Data) -> Checking Folder (ex: INBOX)
---> "check if file not exist" -> (input dir + filename)
---> "check if file exist"
---> "running external command, which send back a true or false"
b) Execute Event (If Checking Task is true, or New Email arrived, or file exist)
------> "mail polling" -> (list of Mailboxes)
------> "external command"
------> "switching"
------------> Radio -> (On/Off/Toogle)
------------> GPRS -> (On/Off/Toogle)
------------> Bluetooth -> (On/Off/Toogle)
------------> Wlan -> (On/Off/Toogle)

i'm not sure, but i think this could be logical ok in this case....
this are my plans.

so example could be:
Check on Monday in time: 06:00 to 22:00 via "imap idle" account "Mailbox1" for new emails.
And if this happen, then "send/receive"(Poutlook) emails on accounts "Mailbox2 + Mailbox3 + Mailbox4 and execute an external command.

i think then it would be more flexible
 
Last edited:

camro

Senior Member
Apr 20, 2007
1,832
33
ok, new version is up,
please test it and let me know your comments.

it should now works very good with imap idle + multiple accounts

my next highest priority is:

.) polling a poutlook mailbox (which will be very easy..)
.) imap idle for normal imap (no ssl) and reactivationg ssl option im mailbox editor
 

camro

Senior Member
Apr 20, 2007
1,832
33
can somebody confirm, that the stop start doesn't work correctly ?

The funny thing on my PDA (Wm6.5) it doesn'twork.
on my emulator wm5,wm6,wm6.5 all are working.

i'm searching the last 6hrs why this happen.
mama mia - i hate MS

how to confirm, that it is working.

if no "imappusherservice.exe" running -> start MAilHandler -> and click "Start Service".
THen you shouldn_t get a message box, that it is running or something.
After clicking "Start Service" -> please take a look with taskmgr, if it is running there.

Then go back to MailHandler and click "Stop Service", then you you get a log in log window and that it is stopped.
if you get message, it is not running, then also something wrong.

thanks cu camel
 

aidy888

Member
Aug 25, 2005
16
1
can somebody confirm, that the stop start doesn't work correctly ?

The funny thing on my PDA (Wm6.5) it doesn'twork.
on my emulator wm5,wm6,wm6.5 all are working.

i'm searching the last 6hrs why this happen.
mama mia - i hate MS

how to confirm, that it is working.

if no "imappusherservice.exe" running -> start MAilHandler -> and click "Start Service".
THen you shouldn_t get a message box, that it is running or something.
After clicking "Start Service" -> please take a look with taskmgr, if it is running there.

Then go back to MailHandler and click "Stop Service", then you you get a log in log window and that it is stopped.
if you get message, it is not running, then also something wrong.

thanks cu camel
Yup, The stop start button does not work correctly . I keep getting the same error message. I am using touch HD with original Rom.

Keep up the good work..
 

camro

Senior Member
Apr 20, 2007
1,832
33
if somebody have the problem with: "Start & Stop Service" - i upload a 0.65a version.
please try this and let me know (because my PDA is not availible now to test)
so i can only test on emulator.

thanks cu camel
 

plustig50

Senior Member
Jan 12, 2008
94
0
Heidelberg
I can confirm the error. also the log does not show info.y the tracefile is working. when i start the service the dataconnection gets established but service is not running. i have to start it manualy
idle not working eather
 

camro

Senior Member
Apr 20, 2007
1,832
33
I can confirm the error. also the log does not show info.y the tracefile is working. when i start the service the dataconnection gets established but service is not running. i have to start it manualy
idle not working eather

wait - now it works.

please try the version 0.65a again.

if i "start the service", it is running.
if i "stop the service", it is stopped and kill all "ImapPusherService.exe".

Also OmapIdle is now working fine.
(i test here the whole night with 3 accounts (2x gmail + 1x my own mail server)

please let me know.

PLS: the log window does only log some infos from "MailHandler".
the logs from ImapPusherService are all goes to tracer (if activated)

The new version 0.65a MASKED the password, so, maybe you can send parts of tracer.txt here (please remove your email-account be fore sending it here.).

cu camel
 

plustig50

Senior Member
Jan 12, 2008
94
0
Heidelberg
i will give it a try and report my results



wait - now it works.

please try the version 0.65a again.

if i "start the service", it is running.
if i "stop the service", it is stopped and kill all "ImapPusherService.exe".

Also OmapIdle is now working fine.
(i test here the whole night with 3 accounts (2x gmail + 1x my own mail server)

please let me know.

PLS: the log window does only log some infos from "MailHandler".
the logs from ImapPusherService are all goes to tracer (if activated)

The new version 0.65a MASKED the password, so, maybe you can send parts of tracer.txt here (please remove your email-account be fore sending it here.).

cu camel
 

camro

Senior Member
Apr 20, 2007
1,832
33
still the same error. start button does not start the service and stop button does not kill it.
i cant post the tracefile right now, because i'm on the road.
i will post it tomorrow

please try to reinstall it again. and delete all before.
because it is working for me really great.

or tell me which system you have installed.
netcf ?
rom ?
wm6 ?
wm6.5 ?

please send the log or/and trace.


does somebody test it where it is working ?

cu camel
 

camro

Senior Member
Apr 20, 2007
1,832
33
wait, this is not possible.
if you start the service, and you see, that the connection will be established. then it is running. Because, if it doesn'T start, then the connection will not be approved any more. THis will be only be done from the service.
The MailHandler is now only a tool which makes the config file for the "service.exe"

(i could make more details and more logical on start/stop, but i want to save my time for making this, because working on big changes ....-> see next post ..)

How do you look if the "imappusherservice.exe" is running or not ?

Here i add a small task manager. Please look with this tool, and let me know if it is started or not.

Thanks for helping to build up this tool.

cu camel
 
Last edited:

camro

Senior Member
Apr 20, 2007
1,832
33
well, i think it is almost time......
(if imap idle is stable, but i had it now running 1day (+ tried to switch off radio, then 30min later switch on again, and i see, that it is now running smooth and no crashes ... but we will see...
and what i had to do before is imap (without ssl), but then .........it is time ...

for next generation:
-> "SchedHandler". (sorry to change the name of application soon)

here i atached pictures, where you can see the menus and setup parts...

The idea is a little bit clearly now for me:

.) the program name will be better as "SchedHandler", because this application should handle scheduling diff. parts and should react if .....

The parts of the application is:

there is a service ...

1.) Scheduler Service - this service should check:

--> Scanning events
+
--> Time plans

if this happen, then:

--> Execution Plan

for details please see the pictures and let me know your ideas, wishes, etc....
because i redesign it now, and if there are extra wishes -> i can implement it now easier ....

so - what do you think about ?

cu camel
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Camro, on a positive note, with 1.56 I haven't been able to spot the 99% CPU bug (yet).
    What I did notice is that after changing connections (like disconnecting or connecting to activesync) I notice SchedService.exe going up to 12% CPU, few seconds later to 6%, and then to 0% again. Is that because of the logging going on?

    EDIT:

    this is normal,
    if the conenction is changed, then it calls the RAS api from wm, and try to get a connect.

    also - for the newer version. PLEASE set the NETWORK check settings to:
    RETRY=15
    RESET=false
    RESTART=false

    (the reset and restart are normally not needed)
    then the connection is faster established again and not neccesary to RESET RESTART the connection again. this is only if someone have a problem. or ex: if connection is changed, then if users are always want to stop the GPRS connection and then the device will find the best connection itself.

    typically it can be: IF GPRS is ON and then the user switch on the WLAN -> then it makes sense to close the GPRS, so that the phone can use the WLAN and not use the established connection.
    -> then i prefer to set the NETWORK checker flag: RESET=ON

    so, then on every changing of the connection the GPRS will be closed and then (automatic) the connection will use the best poss. connection.







    Also, definitely definilely after I disconnect from activesync, (with NO new email waiting for me), it still does the PING sound and outlook polls (but finds no new mail of course). Believe me please!
    well - be carefull - are we talking about the same ?
    if the "SOUND LOG is on for NETWORK" - then you will hear a sound on every changing of connection (WLAN,activesync, GPRS, etc...). then it plays the sound file: "netdown.wav". after that it will communicate to NETWORK checker:
    "Hey NETWORK checker, the connection is now changed, please check the connection, and tell also this to IMAP IDLE thread, that the connection is changed !"
    (now the IMAP IDLE will logout and will wait for NETWORK checker with the message, that all is ok)

    and now communication from:
    NETWORK checker (if connection is OK): "Hey, IMAP IDLE, the connection is now working again, please do your job again !"
    (and so the IMAP IDLE will do go'on again, and it remember on old EXISTS and old UIDNEXT values to see, if there is a new email or not...

    - - - - - - - -
    thinking that new email comes in, but can't see a new email ....

    i belive you, but this is in this case not possible.
    and if you have a logfile - i can show you ...

    some things - what often happen:
    1.) is a spam-appl. on server activated ?
    because if a email comes in, and will be then suddenly deleted, it is a new email for IMAP IDLE !
    2.) a running email client, where a spam appl. is activated (like Outlook - do this via JUMK-EMail....
    3.) mail client running and antivirus program active, so then sometimes it happen on my client, that he delete the virus emails.
    4.) you get an email with manipulted date of an old date or too new date
    + in pocket outlook is only configured, to show the last 3 days...
    -> then you will also not see the email, because pocket outlook contacting the mailserver and tell him, that it want only all emails from the last 3-days...
    ...
    maybe there are more cases, but i think one of them will b true :)

    for all these cases - IMAP IDLE - "see a new email !"

    this can be very easy verified on the "UIDNEXT" (only on fresh login) and on "EXISTS", search for it in your log file (if you use the debug version).
    and you'll see the logic textes when it is a new email.

    Here i'm very sure, that it is working great, but as i told you - if this happen, and you have a log-file :) i can show, then scedhandler do this really comfortable :)

    for me it also happens, that my pda "twitscher" (new email, then i look to outlook and no new email there (because mostly email goes to JUNK..)
    and if the client is also on IMAP, then it is moved from the real folder to another one :) - you understand ?

    Difficult to say why I am not getting 99% cpu right now, is it because of the settings (still running with the settings you posted yesterday, with minor adjustments -> retry @ 15, reset and restart enabled, removed the timeplan), or version 1.56?
    are you using the "CLEAN" version ?
    because if the clean version would work, then it is a problem with the loggin after a while - which would make sense ....
    but i'm frightening, that the problem is another one ...

    but - i'm sure, that the next version helps to find the bug, or maybe then it is gone.
    BEcause i found some mistakes on closing pointers (this i only saw, if i let it reunningunder wm5 emu), which also fixed.

    and on the position, i do now more sensible wakeup + event pulsing ...

    we will see ...
    i think the new version willb eready in 15min