Archive for December 2011

Windows Mobile – tasker2 runs and stops applications periodically

Tasker2 is a tool to launch or kill applications periodically using windows mobile scheduler. It was born to control the running of agent software on windows mobile at specified times. The problem with the agent software was that it does not open/close connections only on usage times but all the time and the device’s battery was drain very fast. We decided to write a helper that would launch and kill the agent to have it running only within a defined time frame.

Background process

We could have written a background process to run external tasks periodically. But the main disadvantage of timers and threads in background processes is that they do not run, if the device is in suspend mode.
To ensure that tasks will be launched also if the device is sleeping, we decided to use the windows mobile scheduler. There are functions inside the notification API to create notifications that will run an application at a specified time. This is what we call a schedule.

The scheduler (notification API)

After a timed schedule has been done by the scheduler, the schedule is removed from the notification database. If you like to have a periodic schedule, you have to ensure that a new schedule is created inside your code.

Pitfalls

During development we found many pitfalls in conjunction with the windows mobile scheduler. This is why I decided to write this post.

The tasks

Tasker2 is a console application without any GUI but it will write a log with all you need to know. Tasker2 supports up to ten tasks. A task is defined using the registry. Every task has an entry for start and stop times, the application to control, an interval for the schedule and a flag for control if a task is only to be run on external power:

REGEDIT4

[HKLM\Software\Tasker\Task1]
"active":DWORD=1
"exe":="\Windows\fexplore.exe"
"arg":="\My Documents"
"start":="1423"
"stop":="1523"
"interval":="2400"
"startOnAConly":DWORD=0;

active: if active is 0, tasker2 will not kill or start the process
exe: name of the process executable to start or kill
arg: arguments to be when launching the executable
start: when to start the executable the next time
stop: when to kill the process the next time
interval: when a start or kill has been executed, tasker2 will create a new schedule using this interval. If the interval is “0010”, the start process will be scheduled for every 10 minutes.
startOnAConly: if 1 and when a process has to be started, the process will only be started if the device is on external power

The scheduler

First, tasker2 is normally only launched one time manually and all future calls are made by the scheduler. Tasker2 will clear and schedule all planned tasks as defined in the registry if it is launched without arguments.

Continue reading ‘Windows Mobile – tasker2 runs and stops applications periodically’ »

Windows Mobile – the no-go world of Function Keys

Hello

I want to summarize the role of function keys in Windows Mobile, former Pocket PC, as I got several questions each week on how to use or enable Function keys in this or that application.

Here is a simple information about how function keys work in Windows Mobile.

Continue reading ‘Windows Mobile – the no-go world of Function Keys’ »

Opencart vqmod – Telefonnummer bei Registrierung nicht erforderlich

Anbei ein kleines vqmod file für Opencart 1.5.1.3 (englische und deutsche Sprachdateien) welches die Telefonnumer bei Registrierung als Kunde nicht zwingend erforderlich kennzeichnet.

Normalerweise muß ein Neu-Kunde seine Telefonnummer bei der Registrierung angeben. Dies wird durch dieses vqmod file geändert und der Kunde muß keine Telefonnumer angeben, wenn er sich registriert. Das vqmod file einfach in das Opencart vqmod/xml Verzeichnis kopieren. Wenn was nicht funktioniert, die Datei einfach wieder löschen.

Continue reading ‘Opencart vqmod – Telefonnummer bei Registrierung nicht erforderlich’ »

Opencart oder OCIE, Versions-Verschleierung

Hallo

falls jemand VOR der Installtion von OCIE 1.2.5 wissen will, zu was das kompatibel sein soll oder auf welcher OpenCart Version das basiert:
OCIE v.1.2.5
Based on OpenCart v.1.4.9.x

Continue reading ‘Opencart oder OCIE, Versions-Verschleierung’ »