Cron Job PHP syntax

52802121

New Member
Messages
4
Reaction score
0
Points
0
Hello all,

I have this php script that I would like to use to clean my database every 24 hours... I am unfamiliar with unix crons (as I have never used it before) so i am wondering if anyone can help me out :)

My guess is - the command syntax would be something like...

php /home/c9cms/public_html/scipts/clear_db.php

am i correct? xD if i am wrong then... can someone please point out my errors?

Thanks :tongue:

Have a nice day !
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
You should ideally give the absolute path to the PHP executable. Providing the path to the script is correct then this should work (Did you mean to type 'scipts' ?):
/usr/bin/php /home/c9cms/public_html/scipts/clear_db.php
 

52802121

New Member
Messages
4
Reaction score
0
Points
0
Yup thanks !! xD

That was exactly what i was wondering. Thou i dunno it's /usr/bin/php in the first place - i'll change it and see how it goes

and yea :p typo there - i meant /scripts

tyvm! 8)
 
Top