• Services
  • What we do & Sell own
  • Cases
  • We are

Helpdesk

Setting up a cron via SSH

1. Login to the server via SSH
2. Type in:
crontab -e
This will open up a editor for you to edit the crontab and then save and it’ll install for you.
3. In the editor you’ll have to input the time manually. Each position is noted by a * (asterisk) if you want it to be every of that time. You’ll need 5 time positions in total and I’ll tell you the positions now:
Minute Hour Day Month Weekday
4. After the time is the command.
5. An example of a cronjob is:
*/10 * * * * php ~/crons/cron.php >> ~/cronlog.log ~/cronerr.err
That will run every 10 minutes.
6. Type in “control-key o” (control-key is the one furthest from the space bar on your keyboard — this should work on Macs also) to save the cronjob
7. Type in “control-key x” to exit the editor.
8. You should now see:
crontab: installing new crontab
9. Your now done with the cron job setup