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.

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?

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:

/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.

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.

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?