RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Send Critical MySQL Data to Your Users Automatically : Page 5

With SQLyog Job Agent, a multithreaded application that enables you to develop MySQL notification applications, you can automate and schedule MySQL database jobs to provide data to users when they need it—regardless of their locations.

Running SJA from the Command Prompt
You can also execute SJA as a command-line tool that takes an XML file containing the session detail. In Linux, the only way to use SJA is to run it from command prompt. The following is the syntax to execute SJA from command line with the XML file as a parameter:

sja  <jobfile> [–l<logile>]

The sja supports the following options:

  • -l<filename> – File where sja will log all the errors it has encountered while syncing databases
  • If you do not specify a log file, sja creates a default log file (sja.log) in the current directory of the executable and logs all error messages in this file.

Scheduling Synchronization Process
In Windows, SQLyog uses the Windows Task Scheduler to schedule the sync process. If you want to schedule it, just click on the Back button and select the Save and Schedule It option.

Figure 10: Providing Job Name

You need to save the session details in an XML file before you can schedule it. Clicking the Finish button starts up the Windows Task Scheduler dialog.

Figure 11: Scheduling the Job Using Windows Task Manager

Sample SJA Job File
The following is a sample job file SJA used:

<?xml version="1.0" encoding="UTF-8"?>
<job version="2.0">
<abortonerror value="yes" />
<result value="yes" />
<includequery value="yes" />
<includemsg value="yes" />
<displayname>Karam Chand</displayname>
<subject>MySQL Help</subject>
<query>select * from mysql.user;</query>

Provide Critical Data On Demand
Immediate access to information is critical in business today, and users can't sit in front of their terminals waiting for important data. They need information as and when they require it. SQLyog's Notification Services allows you to provide just that with a few clicks of the mouse.

Karam Chand is a freelance PHP/MySQL developer based in Bangalore, India.
Email AuthorEmail Author
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date