Reusable code in services or simple js file?

Actually perhaps my whole thing should be under a notifications content-type with services called from the cron