JobAgent

MobSync Wiki
JobAgent
The 'JobAgent.exe' is a Win32 console-command that executes a single job of MobSync. It is located in the same directory where MobSync is installed. It can be used for scripting work or in batch files. Also, you can have further flexibility in timing the jobs by registering a shortcut as a Windows scheduled task.
- "Synchronous timing" and "The dialog window is necessary immediately before execution." setting are ignored among the job settings. It is executed at once.
Synopsis
JobAgent [DeviceName]:[JobName]
- You must not add any spaces before and after ':'
- If some space is included in [DeviceName] or [JobName], please surround in quotes (").
Examples:- JobAgent My_WM5:My_Music
- JobAgent "My WM5:My Music"
- You can use a wildcard charactor '?' in [DeviceName].
Examples:- JobAgent ?:My_Music
JobAgent /whois
- The '/whois' is the only option JobAgent can understand. It show a device name connected now, to the standard output.
- The other arguments of the command line is ignored, when this option is specified.
Return Values
| Value | Meaning |
|---|---|
| 0 | Success |
| -255 | Registration error |
| -254 | No parameters |
| -253 | Invalid parameters |
| -252 | Invalid device name |
| -251 | Invalid Job name |
| -250 | Invalid Job data (CE side) |
| -249 | Invalid Job data (PC side) |
| -248 | Failed to initialize RAPI |
| -247 | No connected |
| -246 | Failed to initialize JobAgent |
| -245 | Failed to get device-name |
| -244 | There is not CE folder. |
| -243 | The specified CE folder is not a directory. |
| -242 | Forced termination |
| -241 | Invalid specifying of PC folder |
| -240 | There is not specifying of CE folder |
| -239 | TimeZone Error |
Log
The log for JobAgent is shared with MobSync. You can view it by selecting [Tools]->[Show Log] from MobSync's main menu.
JobAgent also prints the same log to the standard output. You can get it by redirect at the console. For example:
JobAgent "MyDevice:MyJob" > joblog.log
Make Shortcut
You can make a shortcut to execute a job with JobAgent by selecting a single job in the list then selecting [Tools]->[JobAgent]->[Make ShortCut] in the main menu.
You can register the created shortcut to the Windows Task Scheduler. Using the task scheduler you can more freely set the beginning time or the intervals for synchronizing the job.
Please refer to Windows help to learn more about the Windows Task Scheduler.
This shortcut cannot be used for the "Task scheduler" on Vista, because the option is disregarded.
You need to manually input the task according to the above-mentioned synopsis.
[ Prev:
"Time Zone"Tab
] - [
FrontPage
] - [ Next:
Notes
]
Page History