setting up linux cronjobs

Go down

setting up linux cronjobs

Post by jamied_uk on 4th May 2013, 21:44

in command line (shell terminal)

type following

crontab -e

edit and exit and save!
Running php scripts using crontab examples for locallay executable php files

*/5 * * * * php -f /var/www/html/cj/email1.php >/dev/null 2>&1


now includes line make sure it is like this example


To run a php script from a cli
Now inside the php file you can add this to the top of the line

Remote cronjob examples

*/5 * * * * php -f >/dev/null 2>&1

The following has code at the end to stop any email on cronjobs

>/dev/null 2>&1

Posts : 2381
Join date : 2010-05-09
Age : 35
Location : UK

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum