Jump to content

Load php page automatically


tiota

Recommended Posts

It can be done with cron jobs. Run a specific script at specific time from cron job and trigger a flag in database.

 

Like

PAGE: cronjob.php    @ 4.00 pm

mysql_query("UPDATE pf_events SET notify='1'");

 

PAGE : index.php

 

Select flag from database.

 

$selectflag = "SELECT * FROM pf_events'";
$selectflag2=mysql_query($selectflag);
$selectflag3=mysql_fetch_array($selectflag2);
if($selectflag3[notify] == "1")
{
// paste your popup code here
}
}

Also, you can create another cron job script and run it on 4:05 PM daily to set notify flag again to 0

Another scenario, by using windows scheduler you can ...

 

1. php script is on website

2. employee does not currently have browser open

3. at appointed time, scheduler starts browser pointed to website script

4. employee performs task

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.