Question about Cron
Basically I installed a newletter software on my linode and it requires cron support.
The newsletter software giving me this command to run
> /usr/bin/php -f
/home/user/public/example.com/public_html/software-directory/cron.php
After searching on the library I found this
but if I run > crontab -l
on my ssh it says
> no crontab for username
Do I need to install/enable cron from somewhere? If yes what is the command?
Thanks
4 Replies
crontab -e
will create a new crontab
crontab -e -u username
will create a new crontab for username
man crontab
will provide more help
@obs:
crontab -e
will create a new crontab
crontab -e -u username
will create a new crontab for usernameman crontab
will provide more help
Hi obs,
Do I need to create a new cron tab then paste this command?
> /usr/bin/php -f
/home/user/public/example.com/public_html/software-directory/cron.php
Couple of questions
1. Is crontabs are domain specific? (I installed the newsletter software on subdomain)
2. Do I really need to create a new user to operate cron jobs?
In your case you probably want it running under the www-data or apache2 user (whatever user php runs as) so you'd do crontab -e -u www-data
Then add
0 0 * * * /usr/bin/php -f /home/user/public/example.com/public_html/software-directory/cron.php
To run the command every day at midnight