setting up linux cronjobs

View previous topic View next topic Go down

setting up linux cronjobs

Post by jamied_uk on Sun 5 May 2013 - 7: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 : 2293
Join date : 2010-05-09
Age : 34
Location : UK

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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