Tuesday, 15 June 2010

trying to create a cron on ubuntu server -



trying to create a cron on ubuntu server -

i've been trying create cron doesn't seem working. i'm running ubuntu 14.04. testing i've set cron run every minute.

btw, i'd created cron using, 'sudo crontab -e'. not sure if sudo needed, thought why not in case permissions might issue (by way, php script runs fine command line without sudo)

here's couple variations i've tried, don't work,

1 * * * * /usr/local/bin/php /var/www/html/test/index.php 1 * * * * /var/www/html/test/index.php

and, here's cron (the whole thing)...

# edit file introduce tasks run cron. # # each task run has defined through single line # indicating different fields when task run # , command run task # # define time can provide concrete values # min (m), hr (h), day of month (dom), month (mon), # , day of week (dow) or utilize '*' in these fields (for 'any').# # notice tasks started based on cron's scheme # daemon's notion of time , timezones. # # output of crontab jobs (including errors) sent through # email user crontab file belongs (unless redirected). # # example, can run backup of user accounts # @ 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # more info see manual pages of crontab(5) , cron(8) # # m h dom mon dow command 1 * * * * /var/www/html/test/index.php ~ ~

if have not already, seek starting cron service command /etc/init.d/crond start. hope helps, allow know if doesn't.

ubuntu

No comments:

Post a Comment