Some thoughts on programming stuff

Month: April 2020

Creating Scheduled Azure WebJobs

This blog post will teach you on creating Scheduled Azure WebJobs. The WebJobs are a method to run background tasks in Azure just like Windows Services. These Web Jobs are tied to Azure App Services and can be Continuous or Triggered.

The Continuous type will trigger as soon as it is deployed and can be debugged. Usually the developer controls it’s execution in an endless loop. In adition to that, it runs on all instances that your web app runs. As a draw back, it must have the feature AlwaysOn enabled. Basically, if you have a cheap subscription, you won’t be able to use that.

The Triggered option needs to be triggered manually or scheduled. This execution will only run on one instance of your application. Furthermore, it doesn’t allow remote debugging.

The following file types are supported to be a Web Job, according to Microsoft documentation:

  • .cmd, .bat, .exe (using Windows cmd)
  • .ps1 (using PowerShell)
  • .sh (using Bash)
  • .php (using PHP)
  • .py (using Python)
  • .js (using Node.js)
  • .jar (using Java)

Fortunatelly, what you want is to run a WebJob from time to time using the Triggered type! You will only need to understand CRON expressions to specify the schedule pattern. Please, check this FreeFormatter tool to configure your CRON expression.

According to Oracle, CRON expressions are strings consisting of six or seven subexpressions (fields) that describe individual details of the schedule.

Continue reading

Restart Timer and Admin in SharePoint

SharePoint relies on Timer Service and Admin Service to run and manage its tasks. As any Windows Service, sometimes we need to stop and start them. That’s why I wrote this post to share a script on how to restart Timer and Admin in SharePoint.

These services are present in a SharePoint Server, inside the Windows Services list. There you can see both SharePoint Administration and SharePoint Timer Service:

  • The Admin Service performs administrative tasks for Windows Services under the Local Admin Network rights;
  • The Timer Service sends notifications and performs scheduled tasks for SharePoint services. It must run with an Account with Admin rights to server.
Timer and Admin Services - Restart Timer and Admin in SharePoint
Timer and Admin Services

Script to restart the timer and admin services

The script will load the SharePoint PowerShell dependencies and start by restarting the services in each machine present in the farm. This can throw an error if the Windows Servers are not properly configured to allow remote changes to their services.

Finally, in the end we use some objects provided by the SharePoint DLL to ensure that every Timer service is online and available.

There are other services required to run SharePoint, but it depends on how you are exploring its features. Here is the list of possible mandatory services that you may face and even restart if you want (haha):

  • SharePoint Tracing;
  • SharePoint User Code Host;
  • SharePoint VSS Writer;
  • World Wide Web Publishing Service;
  • SharePoint Server Search.

That’s it! I hope this post can be helpful when you want to restart Timer and Admin in SharePoint. Also you may find useful other posts related to PowerShell in the blog posts available.

References:
StackOverflow

How to use virtual background in Teams

This blog post will show you how to find the buttons and how to use virtual background in Teams. The virtual background in Teams is a new feature recently added by Microsoft. I don’t know if it’s related to the concurrents being able to that like Zoom, but that’s a thing we can discuss later.

Opening the virtual background options

During a call or a meeting, locate the Teams Control Task Bar and click on the Three dots button:

Teams Control Task Bar - How to use virtual background in Teams
Teams Control Task Bar

A menu will popup! Here you must click on Show background effects to open the options available:

Finding the Show background effects - How to use virtual background in Teams
Finding the Show background effects

Virtual background options in Teams

The background settings available are:

  • No backgroud: just like you are used to;
  • Blur background: it will blur the background, letting it focus only on you;
  • Microsoft images: shows images from the interent to be used by you during your meetings;
  • Custom images: the images will show up in the end of the list based on what JPEG images you’ve put in ” %AppData%\Microsoft\Teams\Backgrounds\Uploads ” folder.

Once you select one of the options, you can hit the Preview button to see how it will look like. Once you are good to go, just click in Apply and the video effect will take place and everyone will enjoy it!

Background settings - How to use virtual background in Teams
Background settings

Setting blur background for Teams

If you are not feeling so creative or your real background is just a mess because you didn’t do your bed, just go for the Blur option:

Blur effect - How to use virtual background in Teams
Blur effect

Setting custom backgrounds for Teams

But if you have some nice background and wanna share with your colleagues just to make the meeting more fun or share a part of your personality, then stick with the custom backgrounds!

First you need to save a good JPEG image file inside a specific folder used by Teams:

Teams folder: %AppData%\Microsoft\Teams\Backgrounds\Uploads

Custom backgrounds folder - How to use virtual background in Teams
Custom backgrounds folder

After that, just reopen the Background effects windows and it will show up just like the image below:

Custom backgrounds in the end - How to use virtual background in Teams
Custom backgrounds in the end

That’s it! I hope you learned how to use virtual background in Teams.

References:
Republic world

Overview menu in Azure DevOps

This blog post covers the features available in Overview menu in Azure DevOps. The Overview menu summarizes your project and gives you some shortcuts to your dashboards, Wiki documentation and the project description.

If you are looking for a different post related to Azure DevOps menu, as you know, we have this series of posts related to Azure DevOps features where we deep dive into some of them. Maybe you will find them useful to learn more.

Here we have available the possible pages related to Azure DevOps menu you may be interested in checking:

Overview menu options - Overview menu in Azure DevOps
Overview menu options
Continue reading

© 2024 wiliammbr's blog

Theme by Anders NorenUp ↑