The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Web Programming, Web 2.0 and Mashups
.
google unix.com



Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Hour by Hour counting script. Where do I start? dahelgran Shell Programming and Scripting 4 07-12-2009 06:27 PM
A Hard Days Night iBot Cartoons for Geeks 0 10-07-2008 06:00 PM
an hour less in 24 hour system bobo UNIX for Dummies Questions & Answers 3 10-23-2006 11:55 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-07-2009
francis123 francis123 is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 3
Question every hour and 24hour mid night cron job

I have 2 pages writing in php, and i want cron job to run the first page 'every hour' and the second page every '24hours in other words mid night'. am using cPanel

i put this code on a text file

0 * * * * /home/axe/public_html/admin/viewmemstat.php 1>/dev/null 2>&1

and on the 'Command to run:' text feild, i call this up: mycron.txt

and this was the cron output i got on my mail

"mycron.txt":1: bad minute
errors in crontab file, can't install.


infact i really do not know anything about cron job this is my 1st time.
  #2 (permalink)  
Old 09-07-2009
Vi-Curious Vi-Curious is offline
Registered User
  
 

Join Date: Jul 2008
Location: Texas
Posts: 129
I don't know anything about cPanel but the cron job should be ok. Why not add the job with crontab instead of whatever it is that cPanel is/is not doing?
  #3 (permalink)  
Old 09-08-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,670
According to this cPanel cron tutorial, you are not setting up cron correctly.

If you follow the tutorial, you should enter all the cron time information in the cPanel gui, and the put your:

Code:
/home/axe/public_html/admin/viewmemstat.php 1>/dev/null 2>&1
command about, in the "file to run" part of the cPanel cron setup gui.
  #4 (permalink)  
Old 09-08-2009
francis123 francis123 is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 3
Question 24hour mid night cron job

Quote:
Originally Posted by Vi-Curious View Post
I don't know anything about cPanel but the cron job should be ok. Why not add the job with crontab instead of whatever it is that cPanel is/is not doing?
Thanks for your reply! thats really the problem i am having, i have been hearing about "crontab" i dont even know what it is, where its located, how can i locate it,

I ghues that could solve my problem, if i could locate it, and get directions on how i can place this code in there.
  #5 (permalink)  
Old 09-08-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,670
Well, to know about cron and crontab, you can simple search this forum or use Google and search the net. Cron is basically a chronograph that executes an executable file at a specific time or times. Crontab is the table (file) that holds instructions for Cron.

Regarding cPanel, you will not find much help on cPanel here. Most people here are UNIX/Linux jockeys who prefer not to use cPanel, and instead they manage their processes from the command line (shell).

That is why I gave you a link (below) to a tutorial on this. I think if you do a bit of homework (search and read) and then review the tutorial, you will be good to go. You can post back if you have specific issues/questions after you do some background reading.
  #6 (permalink)  
Old 09-08-2009
francis123 francis123 is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 3
Question

Quote:
Originally Posted by Neo View Post
Well, to know about cron and crontab, you can simple search this forum or use Google and search the net. Cron is basically a chronograph that executes an executable file at a specific time or times. Crontab is the table (file) that holds instructions for Cron.

Regarding cPanel, you will not find much help on cPanel here. Most people here are UNIX/Linux jockeys who prefer not to use cPanel, and instead they manage their processes from the command line (shell).

That is why I gave you a link (below) to a tutorial on this. I think if you do a bit of homework (search and read) and then review the tutorial, you will be good to go. You can post back if you have specific issues/questions after you do some background reading.

Thanks Neo! I have done my homework as you said, Its a diffent ball game with cPanel, all i entered was the path to my file,

Its seems to be working now! but i got this message

Permission denied

what can i do?
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0