Periodic database check

I want to check a server-side database every Tuesday and send email notices to clients who need it. Ideas?

That’s kinda vague, but technically you could easily do this with a cron job and a console app.

http://www.xojo.com/support/consultants.php
You can find a developer to help you there :slight_smile:

Depends on whether you have control/access to the server.

If you do then a separate application that sends these emails can be built and launched using cron/scheduler.

If you don’t then add a subclass of timer to your project to send the emails and create an instance of that class in your app class. Make sure that your smtpserver socket is also a property of the App class so it doesn’t go out of scope, and create a new instance each week.

HTH

Wayne

Where do I find an example of a cron/scheduler?

Can’t use a consultant . . . Need to do it for free (just my labor).

cron is a tool used in linux (and probably macOS), scheduler is a windows tool that does essentially the same job. I’m assuming you do have control of the server (hence the question), so what platform are you developing for? If it’s Windows then I can probably help.

cron is deprecated in osx in favor of launchd.
https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html#//apple_ref/doc/uid/10000172i-CH1-SW2

Linux server

Then cron is a good suggestion as Greg/Wayne said :slight_smile:
https://help.ubuntu.com/community/CronHowto

I have a cron task launch my Xojo console apps periodically on Ubuntu and they have the ability to send email, so it definitely works.

Got a cron job running on my godaddy hosted site. Thanks.

David . . . could you lead me to an example of console app?

Again . . . the idea is to wake up a xojo app on Tuesdays, have it search an SQLite database and send email to people who need notification based on the database . . .

I’ve been able to get cron job to work . . . Now I need to get the xojo app to send an email. Note that there won’t be a user interface . . .

SMTP sockets dont need a UI

Check out Xojo’s Example Projects > Console