Archives
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jan | Mar » | |||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||
Crontab Syntax
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
Other useful syntax:
@reboot Run once, at startup.
@yearly Run once a year, "0 0 1 1 *".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".
Changing Outgoing IP of Mail Server For A Particular Domain in cPanel / Exim
If you are using cPanel, you need to enable “Reference /etc/mailhelo for outgoing SMTP HELO” and “Reference /etc/mailips for outgoing SMTP connections” from the Exim Configuration Editor.

Log into SSH, and edit the file: “/etc/mailhelo” with the helo domains you wish to use:
domain2.tld: domain2.tld
sub.domain2.tld: domain2.tld
addondomain.tld: domain2.tld
other.domain3.tld: other.domain3.tld
*: server1.domain1.tld
Edit the file: “/etc/mailips” with the IPs you wish to use:
domain2.tld: #.#.#.2
sub.domain2.tld: #.#.#.2
addondomain.tld: #.#.#.2
other.domain3.tld: #.#.#.3
*: #.#.#.1
Restart the mail server:
service exim restart
Further reading on Exim settings.
Modifying Glue Record with Nominet’s Web Domain Manager
Nominet unintentionally make it hard to change IP’s / modify glue records in their Web Domain Manager.
For example: if you own the domain sausages.co.uk and you wanted to change the IPs of ns1.sausages.co.uk and ns2.sausages.co.uk you DON’T search for the domain sausages.co.uk and modify it’s nameservers as you would expect. Instead you have to modify the nameservers of any other domain you are not currently using to ns1.sausages.co.uk, ns2.sausages.co.uk and you can you can then edit the nameservers IPs there. Very logical.
Changing Crontab Editor From Vi to Nano/Pico
I hate vi.
I can’t even work out how to exit it without a cheat sheet.
I prefer to use Nano/Pico.
If nano or pico aren’t your default editors you can use the following command to do a one time edit:
EDITOR=nano crontab -e
Or to set it permanently:
export EDITOR=nano
and then you can edit crontab by typing:
crontab -e