[AccessD] A2003:Is a Scheduled Task Running

Stuart McLachlan stuart at lexacorp.com.pg
Mon Sep 21 19:10:30 CDT 2009


If you VBA is going to be run on the Server, it's quite easy.  

You just need to identify a running process.

There's a load of code at
http://www.answers.com/topic/enumerate-processes

which you can just cut and paste into a VBA module.

Comment out the "Sub Load" and call GetProcess with the name of an application.

As written, it does a Debug.Print of the process name if it is running, you can easily modify 
that to do whatever you want.

-- 
Stuart



On 22 Sep 2009 at 9:49, Darren - Active Billing wrote:

> Hi team
> 
>  
> 
> I need to know if a scheduled task on a server is running or not.
> 
> Can this sort of thing be done via VBA?
> 
> 
> 
> The net is full of how to set up scheduled tasks but nothing (I can find) on how
> to see if a scheduled task is running
> 
>  
> 
> The rationale is this
> 
> We have scheduled tasks that create and upload files to servers in the U.S. (We
> are in Australia)
> 
> If the scheduled task is running and file X exists in folder Y at the same time
> - Cool
> 
> If file X in folder Y exists and the scheduled task IS NOT running then it did
> not go well
> 
>  
> 
> I have no control whatsoever over the scheduled tasks, nor the creation of the
> file/s. 
> 
> In fact I have nothing to do with the activities of this server
> 
>  
> 
> I just need to write a wrapper in Access to test the following every 20 minutes
> or so
> 
> If the file exists and the task is running - Cool - Do nothing
> 
> If the file exists and the task is not running - Alert me (So I can alert
> others)
> 
> The others will do all the work in resolving - I just need a simple alert
> nothing more
> 
> Sounds simple eh?
> 
> Many thanks in advance
> 
>  
> 
> Darren
> 
>  
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com





More information about the AccessD mailing list