How to programmatically execute Word Automation programs?

How to force run / run Word Automation programs?
I need to start / execute after submitting the conversion process.

    string siteUrl = "http://localhost";
    string wordAutomationServiceName = "Word Automation Services";
    using (SPSite spSite = new SPSite(siteUrl))
    {
        ConversionJob job = new ConversionJob(wordAutomationServiceName);
        job.UserToken = spSite.UserToken;
        job.Settings.UpdateFields = true;
        job.Settings.OutputFormat = SaveFormat.PDF;
        job.AddFile(siteUrl + "/Shared%20Documents/Test.docx", siteUrl + "/Shared%20Documents/Test.pdf");
        job.Start();
    }
+3
source share
2 answers

You ask, is there a way to force the task to run immediately and not wait for the time interval set in the Word Automation Services administrator settings? There is currently no way to do this in Word Automation Services for SP 2010. All I can think of is changing the time interval to a minimum of 1 minute (unlike the default value of 15 minutes).

+2
source

, , . . ( RunNow SPJobDefinition) .

Word.

eaxmple, PowerShell:

$watj = Get-SPTimerJob "Word Automation Service Application"
$watj.RunNow()

:

Start-SPTimerJob "Word Automation Services"
+4