Archive/tar/minitar is taking time to untar file

I am using ruby 1.9 on windows server.i am using archive/tar/minitar to
untar .tar file of size 45MB.

following code:

Minitar.unpack("…/Data/#{@circle_name}/#{@process_date}/#{@process_time}/#{ip_Dir}/#{enb_tar_file_name}","…/Data/#{@circle_name}/#{@process_date}/#{@process_time}/#{ip_Dir}")

when code is called from command prompt it is working file,takes few
seconds.
but from windows scheduler it is taking more than 10 minutes some times
1 hour to untar the same file.

can anybody has idea of the problem

thanks in advance