hi all,
I have a form that the Service Desk is using where I would run some stuff in the background with jobs. When a job is completed, I'd like to update a control saying that the job is ready to send data.
I have no idea how to write my function so that, whenever a job is ready, a control in the form would be updated to show that?
Should I use a timer and check jobs completion each X seconds? i don't really like that approach as it will get some CPU cliks for nothing if there are no jobs.
Can someone show me a better way to do this?
thanks!
show jobs have completed
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: show jobs have completed
A tick event is about a billion times small as compared to any processor requirements. Don't try to optimize without understanding how computer systems and op-eratinfg systems work as it will just waste your time. To optimize we use tools like the system performance monitor and optimize where there is high usage. A tick would never show on a perfomance analysis.
Set your ticker to one second. That will cause a quick execution once per sencond.
It is even more efficient to not do a job just use code. Then the system will be less distracted and the process will suspend as needed and never get into the way of other processes.
It is necessary to have a good design reason to use jobs. If you are just running something periodically and whant a simple notification then just run a script and pop up a message box when the operation completes then loop again if needed.
Set your ticker to one second. That will cause a quick execution once per sencond.
It is even more efficient to not do a job just use code. Then the system will be less distracted and the process will suspend as needed and never get into the way of other processes.
It is necessary to have a good design reason to use jobs. If you are just running something periodically and whant a simple notification then just run a script and pop up a message box when the operation completes then loop again if needed.
Re: show jobs have completed
There are stuff in my GUI that take time to process and the GUI goes "not responding". To avoid that, I'd like to trigger these actions with a job instead.
so you say that i should add a timer to my GUI? I'll give that a try.
thanks!
so you say that i should add a timer to my GUI? I'll give that a try.
thanks!