0

I need to know whether it is possible to create a program/script that runs autonomously once initiated by an event (usually a mouse click) without any further interactions from the user ie. even if he closes his browser the script continues to run on the server

Scenario

lets say that I've got a video sharing site whose permissions,login access and all other relevant credentials are given to me .I've created a crawler in PHP that crawls the entire site and writes the video src's of all the videos on the site in a file called log_file.txt. Now i want to know whether it is possible to create a program that,once i initiate it , downloads the videos from the site's server onto my server using the src's in the log_file.txt, and this continues to work even if i shut down my computer ie. runs on the server continuously until all the videos have downloaded or otherwise

NOTE : this question is not intended to perform piracy of any sorts. Its just that i have a site that has got some basic video hosting and i want to perform server to server video migration without having to download it on my pc and then reuploading it to new server

Dev Man
  • 2,114
  • 3
  • 23
  • 38
  • The crontab is a list of commands that you want to run on a regular schedule, and also the name of the command used to manage that list. crontab stands for "cron table," because it uses the job scheduler cron to execute tasks; – Vipin Sharma Mar 15 '16 at 14:29
  • @VipinSharma Elaboration please? – Dev Man Mar 15 '16 at 14:32
  • Please check link , it might be helpful >> http://stackoverflow.com/questions/22358382/execute-php-script-in-cron-job – Vipin Sharma Mar 15 '16 at 14:33
  • @VipinSharma it says it needs a linux server and i've got a windows server – Dev Man Mar 15 '16 at 14:35
  • for windows-7 Open Control Panel Go to Administrative tools Select Schedule Task General Tab, Give a name to your scheduled task. e.g. Test Cron Job Select Trigger Tab, Click "New", Select timings for executions of Cron Job Select Actions Tab, Click "New", Select Program to execute, in our case we want to run Cron Job. So we will require to run browser. So select Firefox, Chrome, IE etc. Suppose Cron URL is http://example.com/cronjob.php Action should be like "C:\Program Files\Internet Explorer\iexplorer.exe" "http://example.com/cronjob.php" – Vipin Sharma Mar 15 '16 at 14:39
  • @VipinSharma will i have to do this configuration on my laptop? – Dev Man Mar 16 '16 at 08:40

0 Answers0