Ajax call module function
I guess the answer depends on what that ajax call does, and if it is for a 'one site use' or for a contribution module. 

If it s for a contribution module hook_menu might be the only way to go.

Though if it s just for a 'one site use' i would just add a JS snippet in your page.tpl.php or even html.tpl.php that launches the Ajax query. This would work on every page even when if cached.

EDIT
Actually you could also use the page preprocess function and add a js file to all your pages.