ID #1059

How do I execute a job with SJA with a single mouse-click?

 

Being able do so can be practical if you want someone to be able to execute the SJA with some preconfigured jobfile without having any idea of what a database is :-) . And it makes life a little bit easier too with jobs that occur often with users that do know!

We will sketch out two ways to do that.

 

First way:

1) You'll need to create a shortcut to the sja executable with the xml-file as a parameter at your desktop (or some other folder - but we will here assume that you want it placed on your desktop).

2) So starts creating a XML-job-file as you normally do. Now create a shortcut on the desktop either by dragging the XML-job file (or any other file for that sake!) there with the right mouse-button or just right-click the desktop and choose "new .. shortcut".

3) Now right-click the new shortcut and choose "properties" and change "destination" to the path of the SJA executable followed by the xml-file as a parameter. That will be somewhat like

"C:\Program files\SQLyog Enterprise5.0\sja.exe" myjob.xml

and be sure that the "start in" folder is the same. Also note that the quotes are needed if there is a space character in the file path.

 

Second way:

This method takes advantage of the fact that although the SJA jobfiles are standard XML files, SJA does not need the file extension to be .xml. It can be anything. So you can create a new jobfile (or rename an existing one) to use the suffix .sjajob for instance. Now the system will just need to be told that .sjajob files must be executed by the SJA. You can apply that setting from Control Panel... File Types or you can just double-click the .sjajob file. Windows will then ask you which executable to use. Choose sja.exe from the explorer window popping up and check the checkbox "always use..." Now the system knows that for the future .sjajob files must be executed with SJA. You can now place a shortcut to the .sjajob file anywhere.

 

Also note that when you have placed the shortcut where you want it you can right-click it and change its name from for instance "shortcut to myjob.sjajob" to something more explaining like "Backup vendor database". This change only affects the display of the shortcut itself on the desktop. And you may even change the Icon. And that no matter which of the above methods were used.

Finally note too that the executable to run is the SJA execuable sja.exe and not the SQLyog GUI executable

Also see: http://www.webyog.com/faq/27_35_en.html. Creating a .bat-file for executing one or more SJA jobs of course is an option too.

 

Tags: -

Related entries:

You can comment this FAQ