Trigger Server Method a couple of minutes after Method execution

Hi Community,

does anybody know a simple approach to trigger a Server Method from a Server Method with a timeout of a couple of minutes?

I am not sure, if a regular timeout inside the first Method is the best approach. I also want to avoid using a regular scheduler, case the two Methods do not have triggered on a regular basis. Sometimes we need them 6 times a day and then there are weeks where we do not use them.

Or maybe somebody has another idea how to solve this one:
I use this project to upload multiple image to MPP at once:

The project still offers a lot of room for improvements, but it basically does the job. It contains a Method that automatically creates new Items of type 'tp_Image' and adds files to them.
I now want to trigger a second server Method after the tp_Images are created. The second Method shall trigger an image duplication/conversion, as we use a different approach to store the files for the tp_Images.

An onAfterAdd event doesn´t work, as the time between File upload and file conversion is to small. So I am looking for a simple way to trigger the Method after a couple of minutes.

Thanks for any ideas!

  • I was able to use an onUnload event that update triggers the image conversion as soon as user close the image uploader.

    Although onUnload and onBeforeUnload events are a little bit special. Alerts or other dialogs will not work from an unLoad event. Even error messages will not be thrown. So debugging them is a little bit special, as you will not get notified if the Method fails.