Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Mar 12, 2012 2:53 am 
Offline
Junior Member

Joined: Sat Feb 11, 2012 3:29 pm
Posts: 26
Hi all, I Have a php file in which I have code that does reset on a counter in my mysql database. I would like to have this php file execute everyday at 12:00AM . I am on Arch Linux, with Nginx and php-cgi. I googled this and then found this bit of code :
Code:
0 0 * * * /path/to/php /var/www/html/reset.php


but I have no idea how to run it or how to set it in place. can any one help (also is that bit of code that simple? simply include the path to my php and the script)?

p.s. sorry about the duplicate post, i did not intend for that to happen.


Top
   
 Post subject:
PostPosted: Mon Mar 12, 2012 4:09 am 
Offline
Senior Member

Joined: Fri Jan 20, 2012 11:19 am
Posts: 100
You need to set it up as a cron entry. See run PHP script using cron for a bit more background.

_________________
If all else fails, reboot...
PHP Tutorials and MySQL Tutorials


Top
   
 Post subject:
PostPosted: Mon Mar 12, 2012 1:59 pm 
Offline
Junior Member

Joined: Sat Feb 11, 2012 3:29 pm
Posts: 26
nehalem wrote:
You need to set it up as a cron entry. See run PHP script using cron for a bit more background.

excellent, thank you!


Top
   
 Post subject:
PostPosted: Tue Mar 13, 2012 2:56 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
If you do not have the php command available, you'll want to install the php-cli package from your distro's repositories.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: nqservices and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group