Sort of an automated download script - when it stops the script due to the time limit , i need to make it run a function to delete the files .
Maybe something like this :
set_time =1 ; ( kind of starts a counter when the script starts )
If $set_time = (3600) // ( when the script reaches 3600 sec , it does the following )
{
function to delete file
Stop command
]