flagman5 Posted April 17, 2006 Share Posted April 17, 2006 Hi AllSorry if this is a commonly addressed questionbut is there way to create php script/function that will automatically edit a TXT file in the same directory at a specified time?my use for this is that I have a webpage where it shows a bunch of threads (kind of like a bbs) and then I want to be able to insert a big horizontal break after each day, so it nicely separates each days postingsis it possible to coordinate with the server clock and at the beginning of everyday at 00:00:01 it will automatically edit that webpage and pop in the daybreak linethanks! Link to comment https://forums.phpfreaks.com/topic/7577-auto-executing-php-scripts/ Share on other sites More sharing options...
ypirc Posted April 17, 2006 Share Posted April 17, 2006 I'm assuming the server is *nix based...look into crontab. If it's windows based, windows as the "at" command. Link to comment https://forums.phpfreaks.com/topic/7577-auto-executing-php-scripts/#findComment-27609 Share on other sites More sharing options...
DrDre Posted April 17, 2006 Share Posted April 17, 2006 Unless you leave your browser open 24/7 refreshing every second, theres no way to make it on a php level schedule things to happen.So yeah you got to use cron jobs or at as said above.php works as its called, it doesnt run 24/7. So unless its being run at the time being needed it doesnt know to run Link to comment https://forums.phpfreaks.com/topic/7577-auto-executing-php-scripts/#findComment-27650 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.