Differences

This shows you the differences between the selected revisions of the page.

2014-09-09 2014-09-09
article (martin) linking to session log section (martin)
Line 41: Line 41:
When the WebJob is executed, its files are cloned to a temporary folder (see ''WEBJOBS_PATH'') and the job is run there. So it makes no sense to store any data to job's working directory, as that is not persistent and is not accessible remotely. Use ''WEBROOT_PATH'' to locate either job's master directory (''%WEBROOT_PATH%\App_Data\jobs\%WEBJOBS_TYPE%\%WEBJOBS_NAME%'') or ''WEBJOBS_DATA_PATH'' to locate job's data directory. See [[guide_microsoft_azure_webjob_sftp#powershell|implementation sections]] below for examples. When the WebJob is executed, its files are cloned to a temporary folder (see ''WEBJOBS_PATH'') and the job is run there. So it makes no sense to store any data to job's working directory, as that is not persistent and is not accessible remotely. Use ''WEBROOT_PATH'' to locate either job's master directory (''%WEBROOT_PATH%\App_Data\jobs\%WEBJOBS_TYPE%\%WEBJOBS_NAME%'') or ''WEBJOBS_DATA_PATH'' to locate job's data directory. See [[guide_microsoft_azure_webjob_sftp#powershell|implementation sections]] below for examples.
-===== Copying Session Log to Job Log =====+===== [[log]] Copying Session Log to Job Log =====
The standard output of the job is redirected to a log file which you can display on Azure Management Portal. The standard output of the job is redirected to a log file which you can display on Azure Management Portal.
Line 62: Line 62:
  * enable session logging to a unique job run directory (''%WEBJOBS_DATA_PATH%\%WEBJOBS_RUN_ID%'');   * enable session logging to a unique job run directory (''%WEBJOBS_DATA_PATH%\%WEBJOBS_RUN_ID%'');
  * locate source or destination paths of the transfer using WebJob [[guide_microsoft_azure_webjob_sftp#environment|environment variables]];   * locate source or destination paths of the transfer using WebJob [[guide_microsoft_azure_webjob_sftp#environment|environment variables]];
-  * print session log to a standard output, so that it is available from Azure Management Portal.+  * [[guide_microsoft_azure_webjob_sftp#log|print the session log to the standard output]], so that it is available from Azure Management Portal.
An example script (''script.txt'') that backs up the WebSite to a remote SFTP server: An example script (''script.txt'') that backs up the WebSite to a remote SFTP server:
Line 119: Line 119:
  * enable session logging to a unique job run directory (''%WEBJOBS_DATA_PATH%\%WEBJOBS_RUN_ID%'');   * enable session logging to a unique job run directory (''%WEBJOBS_DATA_PATH%\%WEBJOBS_RUN_ID%'');
  * locate source or destination paths of the transfer using WebJob [[guide_microsoft_azure_webjob_sftp#environment|environment variables]];   * locate source or destination paths of the transfer using WebJob [[guide_microsoft_azure_webjob_sftp#environment|environment variables]];
-  * print session log to a standard output, so that it is available from Azure Management Portal;+  * [[guide_microsoft_azure_webjob_sftp#log|print the session log to the standard output]], so that it is available from Azure Management Portal;
  * cannot use ''[[http://technet.microsoft.com/en-us/library/hh849877.aspx|Write-Host]]'' cmdlet in Azure WebJob as there is no console to write to, use ''[[http://technet.microsoft.com/en-us/library/hh849921.aspx|Write-Output]]'' instead.   * cannot use ''[[http://technet.microsoft.com/en-us/library/hh849877.aspx|Write-Host]]'' cmdlet in Azure WebJob as there is no console to write to, use ''[[http://technet.microsoft.com/en-us/library/hh849921.aspx|Write-Output]]'' instead.

Last modified: by martin