是否有可能每小时在后台运行一个PHP脚本?

I'm Trying to get the links of all script tags of any given site (will only be trying it on my own personal sites). Using simplehtmldom http://simplehtmldom.sourceforge.net/manual.htm I have a working bit of code but no idea how or if it is even possible to run this script on a lamp server in the background once an hour, forever. By in the background I mean without a user actually on the site. Is there a simple way to achieve this? even a quick botched (simple) way would be great! Thanks.

require 'simple_html_dom.php';

function logToFile($filename, $msg) 
   {  
   // open file 
   $fd = fopen($filename, "a"); 
   // write string 
   fwrite($fd, $msg . "
"); 
   // close file 
   fclose($fd); 
} 

$html = file_get_html('randomsite.com');

// set default timezone
date_default_timezone_set('Pacific/Auckland');
$current_date = date('d/m/Y | H:i:s');

// set scripts src
$current_src = '';

$scripts = $html->find('script');
    foreach($scripts as $s) {
        if(strpos($s->src, 'jquery') !== false) {
            //do nothing
        }else{
              $current_src = $current_src . $s->src . ' ';
        }
    }

echo $current_src;

logToFile("data.log", "$current_date : $current_src".PHP_EOL);

Yeah,this is possible. If you want to run any script every hour than you can use cronjob in which you have to define like below cronjob and it will work fine. Syntax :

minute hour day month day-of-week command-line-to-execute 

if you want to every hour than need to select like below

*1 * * * php /var/www/html/VMonitor/download_file.php