I don't know how to set up cron with ssh? I opened ssh and typed "crontab -e". What do I do then? I want to repeat the function every minute. I have this code as "cron command to run": php -f /var/www/vhosts/nf-test-host.tk/httpdocs/admin/cron/cron.php.
I am on CentOS. What should I do, exactly? Thanks in advance!
On CentOS, Redhat and Amazon Linux cron logs are written to /var/log/cron . You will likely require root/sudo privileges to access your cron logs.
Crontab Working: Crontabs can be found in the local directory, such as in “/var/spool” or “/var/spool/cron/crontabs”, which is its sub-directory.
*/30 * * * * your_command. this means "run when the minute of each hour is evenly divisible by 30" (would run at: 1:30, 2:00, 2:30, 3:00, etc) example #3. 0,30 * * * * your_command. this means "run when the minute of each hour is 0 or 30" (would run at: 1:30, 2:00, 2:30, 3:00, etc)
You can try out different timing values in the crontab sandbox. It will show you a list of run times. www.dataphyx.com/cronsandbox/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With