(Assuming the standard database + application server that provides the API endpoints)<p>How do you handle accessing the database from periodic maintenance tasks? (anything from cron phps to aws lamba functions)<p>Do you connect directly to the database?<p>Do you add specific endpoints in the application server/API so that the job doesn't directly access the db?<p>What pros/cons did you notice with your approach?