You may find some excellent references from the Ubuntu Docs or from a manual page additionally a nixcraft article can make sense of things, but all a crontab does is execute a shell command,
Each cron defintion gets on line of the file, formatted like so:
* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)
The general form you'll probably want to take is:
0 12,13 * * * cd /var/www/path/to/symphonyappdir/ && php mysymphonything.php
the cd
should generally use an absolute path to your app dir, the &&
is logic for 'and', so if the 'cd' fails (presumably because the directory wasn't accessible) the second half wont execute.
Save this file anywhere, the crontab manual suggest that users should not directly edit crontab files.
Open your primary crontab file with:
crontab -e
Or add a new file to a crontab with:
crontab mynewcronfile
You can also get a current crontab file contense with:
crontab -l