| 
		
			
			
				
			
			
				 
			
			
				
			
		 | 
		
			
			
				 
			
				
			
		 | 
	||||
| 
				Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.  You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us.  | 
		
		 
		![]()  | 
	
		
			
  | 	
	
	
		
		|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
| 
		 | 
	Thread Tools | 
| 
			
			 | 
		#1 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jun 2002 
				Location: france 
				
				
					Posts: 996
				 
				
				
				
				 | 
	
	
	
	
		
			
			 i have a php script (page) that i want to be executed at every 12/24 hours.. how can i do so the script to be automaticaly executed at a fixed date from the day? 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jul 2004 
				Location: UltraVirtuality 
				
				
					Posts: 1,728
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Unix/Linux servers can execute it for you every 12/24 hours, whatever you choose. 
		
	
		
		
		
		
			
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Mar 2004 
				Location: New Orleans, LA 
				
				
					Posts: 1,001
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 cron 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	PHP Programmer ICQ 215-504-788  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#4 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jun 2002 
				Location: france 
				
				
					Posts: 996
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 let's say that the php script is located at /home/script.php can somebody explain me exactly what i have to do so the script.php to be automaticaly executed at a fixed hour each day?  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jul 2004 
				
				
				
					Posts: 116
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Teach a monkey to type in the text, then give the monkey a big banana every 12/24 hours. Don't make it sign any agreements, don't know if it will agree to do that. I know these monkeys drive a hard bargain... 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() MAILERS MAILERS: Need a hot product? Click to find out!"  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Disruptive Innovator 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Sep 2003 
				Location: Vegas 
				
				
					Posts: 4,230
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 
				__________________ 
		
		
		
		
	
	C:\Code\ C:\Code\Run\  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Oct 2002 
				Location: European Union 
				
				
					Posts: 1,752
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Ask your host 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#8 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jun 2002 
				Location: france 
				
				
					Posts: 996
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 jellyfish  
			
		
			
			
			Join Date: Dec 2003 
				
				
				
					Posts: 71,528
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 ![]()  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#10 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jul 2004 
				Location: UltraVirtuality 
				
				
					Posts: 1,728
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Nov 2003 
				
				
				
					Posts: 4,292
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 make a cron job,  
		
	
		
		
		
		
		
	
	or hit f5 twice a day ![]()  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#12 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jul 2004 
				Location: UltraVirtuality 
				
				
					Posts: 1,728
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Maybe this helps: 
		
	
		
		
		
		
			
		
		
		
		
	
	Example Crontab: # r----minute # | r-----hour # | | r------day of the month # | | | r------month # | | | | r------day of the week # | | | | | |------ command to run -------------> # | | | | | | 5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1 # run five minutes after midnight, every day 15 14 1 * * $HOME/bin/monthly # run at 2:15pm on the first of every month -- output mailed to paul 0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?% # print out the message at 4:05 every sunday. 5 4 * * sun echo "run at 5 after 4 every sunday" If this file were saved as "paul.ct" then crontab -u paul paul.ct would be used to store the crontab for the user paul. For more information: man cron man crontab man 5 crontab If it doesn't help..... back to yahoo and howtos  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#13 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jun 2002 
				Location: france 
				
				
					Posts: 996
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 if i type this line from ssh  
		
	
		
		
		
		
		
	
	php /home/script.php > /dev/null the script.php is executed but if i write this line in crontab: * * * * * php /home/script.php > /dev/null or 30 7 * * * php /home/script.php > /dev/null is not executed.. what can be the problem?  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Feb 2004 
				
				
				
					Posts: 3,505
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Use wget instead and specify the external address. 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#15 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jul 2004 
				Location: UltraVirtuality 
				
				
					Posts: 1,728
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#16 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jan 2003 
				Location: NL 
				
				
					Posts: 342
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 that works 30 1 * * * /usr/local/bin/wget --spider -q http://www.yourdomain.com/path/script.php >/dev/null 2>&1 the path top wget you can get with 'whereis wget' (SSH or telnet) if it's htaccess/ htpasswd protected... then http://user:[email protected]/path/script.php ....  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#17 | 
| 
			
			
			
			 Registered User 
			
		
			
				
			
			
			Industry Role:  
				Join Date: May 2004 
				
				
				
					Posts: 20
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 alex 
		
	
		
		
		
		
			you shouldn't need to re-start cron -- it re-loads all crontab changes automatically. The reason your crontab entry didn't run was probably because cron couldn't find the php binary ... try again with the full path to your php binary e.g. * * * * * /usr/bin/php -q /home/script.php > /dev/null 2>&1 hth rich 
				__________________ 
		
		
		
		
	
	Email: [email protected]  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#18 | 
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: Cyprus 
				
				
					Posts: 1,327
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 crontab is your solution... 
		
	
		
		
		
		
			
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 |