Easy way to remember
Ad = for (for a purpose)
hoc = this
Ad hoc implies that there is no specific justification and the task is for a specific purpose. There may be no previous precedent to support that task.
This is an ad hoc payment for the month.