CeRunAppAtTime generally works. One reason it may fail for you (and I'm
shooting in the dark since you have not provided much details) is that if
the application being launched is a CF application and it was already
running in the background, the second copy will not be launched. Instead an
existing one will attempt to go into foreground

Signature
Alex Feinman
---
Visit http://www.opennetcf.org
> Hello All, I really need help creating a scheduled task. I have tried
> using CeRunAppAtTime and CeSetUserNotificationEx however have not had any
[quoted text clipped - 5 lines]
>
> Thanks In Advance
It is a CF application however, it is not the same one. I have one main
application that is used, everytime this application is started, it calls
the usernotifications.runapplicationtion that I found here:
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/notifications.aspx
Here is how I call it:
string path;
path =
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
);
//First reset task time
DateTime dtNextRunTime =
Convert.ToDateTime(DateTime.Now.AddDays(1).ToShortDateString() + "
05:00AM");
MyApp.Classes.UserNotifications.RunApplication(path +
"\\FTPTask.exe","",dtNextRunTime);
All my FTPTask.exe does is set a Token File and then warm boots the device
to clear everything out of memory. Then when the main application starts
up, it looks for this token file.
Here is what my FTPTask.exe looks like:
static void Main()
{
string path;
path =
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
);
File.Create(path + "\\update\\FTP.tok");
Rebootapi reboot = new Rebootapi();
reboot.SoftReset();
}
private void Form1_Load(object sender, System.EventArgs e)
{
}
public class Rebootapi
{
[DllImport("Coredll.dll")]
extern static int KernelIoControl(
int dwIoControlCode,
IntPtr lpInBuf,
int nInBufSize,
IntPtr lpOutBuf,
int nOutBufSize ,
ref int lpBytesReturned );
[DllImport("Coredll.dll")]
extern static void SetCleanRebootFlag();
public void SoftReset()
{
int IOCTL_HAL_REBOOT = 0x101003C;
int bytesReturned = 0;
// Do not use SetCleanRebootFlag()
KernelIoControl(
IOCTL_HAL_REBOOT,
IntPtr.Zero,
0,
IntPtr.Zero,
0,
ref bytesReturned );
}
}
Any ideas? Although I am setting this by calling the
CeSetUserNotificationEx (though usernotifications.runapplicationtion ) could
something be clearing it out of memory after I set it?
> CeRunAppAtTime generally works. One reason it may fail for you (and I'm
> shooting in the dark since you have not provided much details) is that if
[quoted text clipped - 11 lines]
>>
>> Thanks In Advance