[AccessD] A2003:Is a Scheduled Task Running

Darren - Active Billing darren at activebilling.com.au
Mon Sep 21 19:21:41 CDT 2009


Hi Stuart

Thanks for the quick reply
That's way over my head that stuff
Also my access app won't be on that server either
I was hoping to pass in a known server name and a known ProcessName or ProcessID
for the Scheduled task and get back a result.

Too optimistic me thinks <grin>

DD


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Tuesday, 22 September 2009 10:11 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] A2003:Is a Scheduled Task Running

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


-- 
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