Scheduling events in Alpha Five Version 10
I hope everyone had a safe and happy Thanksgiving, but doesn't Monday hurt just a little bit more after a long holiday weekend? BACK TO THE GRIND, FOLKS. How can I complain, though, when I have you to come back to?
In fact, I spent the last few days watching a customer's question about Alpha Five Version 10 be resolved quickly and easily over e-mail, and it brightened my day to be reminded that our developers are not only responsive to our customers' needs, but jump at the opportunity to help them create outstanding applications.
One of our customers recently downloaded the Alpha Five Version 10 trial, and as he put it, had spent the last week "exploring all the great improvements." But he had a question. He couldn't figure out how to create events that are triggered by date and/or time in Alpha Five Version 10.
For example, the system he's creating will allow him to enter future actions that his church needs to take regarding members who may have upcoming events, such as surgery or anniversary of a death in their family. As such, he wants the database to have a field for that date/time, which Alpha will then automatically generate an e-mail reminder on that date.
He also wants to be able to set up a recurring request to send out an e-mail (or a report attached to an e-mail) that summarizes all the recent prayer items posted into a database without requiring a person to initiate the report. But he couldn't figure out how.
That's when Alpha developer Jerry Brightbill stepped in. Since this is a question other people out there delving into Alpha Five Version 10 might have, I thought I'd post Jerry's solution here on the blog.
As Jerry said in his e-mail back to our customer, if you're working on the desktop, there are a number of methods to schedule events. The desktop has a function that can be used to set up schedules to run scripts (script_schedule()) as long as the database is open. This can be used to automate various processes. For more information on this functionality, have a look at our script_schedule() help page.
Another method is to set up an Alpha Five database that has a script called an autoexec script. When the database opens, the script runs automatically. It can perform a number of actions and then close the database when done. The database can be opened by a batch file run by the Windows scheduler. This has the advantage of not requiring a database to be open all of the time and the schedule is controlled by Windows.
A similar capability on the Web side is more challenging, but many developers have set up what are called "cron jobs." A cron (short for chronograph) is a time-based job scheduler in Unix-like computer operating systems. This lets users schedule tasks to run automatically at a certain time or date. In its infancy, it was most often used to automate system maintenance or administration, but today, it's essential for other purposes, such as connecting to the Internet and downloading e-mail.
For more information about how other Alpha users are incorporating crons into their applications, have a look at the Alpha user message board. Note: the message board will require a quick sign up to access the page.











