I need to backup a directory every 30 minutes, but only when a specific application is running. The only time those files are changed is when the application is running.
Is there a way to do this?
Is there a way to run tasks only if a specific application is running?
Re: Is there a way to run tasks only if a specific application is running?
Not that I am aware of. But why don't you use a timer *incremental* task? This will have the same effect.
--
Luis Cobian
Cobian Backup's creator
Luis Cobian
Cobian Backup's creator
Re: Is there a way to run tasks only if a specific application is running?
I'm currently using incremental. The only thing about this is it creates a new folder everytime the task is run even if there's nothing to backup. Other than that it does it's job.
Re: Is there a way to run tasks only if a specific application is running?
There is surlely some clever way by using some Pre-Backup event but I'm really out of ideas.
--
Luis Cobian
Cobian Backup's creator
Luis Cobian
Cobian Backup's creator
Re: Is there a way to run tasks only if a specific application is running?
You might be able to use get-process in a powershell script to get that information.
Re: Is there a way to run tasks only if a specific application is running?
Should work, yes.
--
Luis Cobian
Cobian Backup's creator
Luis Cobian
Cobian Backup's creator
Re: Is there a way to run tasks only if a specific application is running?
Simply put, you can use a pre-backup control/script using tasklist or pslist.
Similar to:
for /f "tokens=1,2, 8 delims== " %%A in ('C:\TASKS\PSTools\pslist ') do (
if "%%A" == "MiAPP" (
run Backup
)
)
)
Similar to:
for /f "tokens=1,2, 8 delims== " %%A in ('C:\TASKS\PSTools\pslist ') do (
if "%%A" == "MiAPP" (
run Backup
)
)
)