Restart IIS service every 2 hours.


Recommended Posts

I've made a bat for restarting IIS and scheduled it to run every 2 hours, (cuz i have to find a solution for an exchange prob, and i use this workaround as temporary solution for the problem)

iisreset.bat

start iisreset

when the schedule starts it popup a LOT of Cmd windows (20-30 Windows) with the path of the script.

Does anyone have any hint?

BTW

Meery Xmas to all

Link to comment
https://www.neowin.net/forum/topic/261514-restart-iis-service-every-2-hours/
Share on other sites

the problem is related to the delivering of e-mail in the Lan, restarting IIS (for Smtp) it will deliver the mail succesfully, until i get to fix this problem(it seems that is related with the AV,,,Trend) i have to restart iis .

The problem now is with the number of cmd windows that pops out when the bat is exeute.

if you are running iis 5 take a look at this

http://www.microsoft.com/downloads/details...&DisplayLang=en

for iis 6 try this vb code (just save it as iisrestart.vbs). change '2142295254' to your server name

strComputer = "."
Set objWMIService = GetObject _
    ("winmgmts:{authenticationLevel=pktPrivacy}\\" _
        & strComputer & "\root\microsoftiisv2")

Set colItems = objWMIService.ExecQuery _
    ("Select * From IIsWebServer Where Name = " & _
        "'W3SVC/2142295254'")

For Each objItem in colItems
    objItem.Start
Next

if its the smtp portion that is causing you issues, why not just stop and start the smtp service? Why do you need to reset all of IIS?

net stop servicename

net start servicename

or you could use

sc stop servicename

sc start servicename

Or if your really having issues and the service is hanging, why not just set the service to restart on failure - and then kill it every 2 hours?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • >defenders of AI-generated artworks often claim that AI is just a tool It is not. It is the inhuman artist replacement. The human writing the prompt is the employer/manager requesting the work product of the artist -- a supervisory/descriptive job that doesn't carry with it any rights to the copyright of that work product at all. And since AI is not human itself, it can't gain copyright for anything it is asked to regurgitate or hallucinate, so it can't transfer that copyright to the employer/manager/human who asked for the output. This was all legally reaffirmed last year. So, no, while there are AI tools, AI slopware generation is NOT a "tool" in the legal definition of that word.
    • As long as i get to play GTA 6 before it ends 😂😂
    • Google is opening the world's first AI museum in Los Angeles by Ivan Jenic Image via: Google Ever since AI image generators went mainstream, the debate over whether AI-generated art is real art hasn't let up. Those who don’t consider AI to be art say that if a machine does the creating and anyone can prompt it, there’s no skill involved, and therefore no art is produced. The counter-argument is equally persistent, as defenders of AI-generated artworks often claim that AI is just a tool, and that every major technological breakthrough, like the camera or the computer, was met with the same skepticism before eventually being accepted as a legitimate creative medium. Google’s position in this debate is clear. Which is no surprise, as the company is investing billions in AI infrastructure. And now, in efforts to encourage people to use its AI even more, Google is opening Dataland on June 20, which it's calling the world's first AI arts museum. Located inside The Grand LA, a Frank Gehry-designed building in Los Angeles, the museum spans 25,000 square feet. The museum is built around a collaboration with media artist Refik Anadol, who has worked with Google since 2016. The inaugural exhibition is called Machine Dreams: Rainforest, and is powered by an AI model trained on “an extensive dataset of the natural world.” It generates 1.2 billion pixels of visuals in real time and reacts to visitors dynamically. The space also generates soundscapes, real-time emotion sensing, and algorithmically produced scents. Image via: Refik Anadol Studio / Google Google says that the museum is powered by its Gemini models, which run on Google Cloud. So, everything is generated inside one of Google’s AI data centers and is streamed to the museum. Alongside the museum opening, Google Arts & Culture is funding an AI Artist Residency, giving four artists $25,000 grants each, along with mentorship from Refik Anadol Studio and access to Google's machine learning tools. Their work will be shown at Dataland and on the Google Arts & Culture website later this year. Google’s AI museum will undoubtedly initiate a fired-up debate on social media, and we can’t wait to see the first reactions. Via: Smithsonian Magazine
    • Calling GTA 6 overhyped crap doesn’t make you edgy, it just makes you sound like someone who hasn’t enjoyed anything since the PS2 era.
    • I’m not arguing whether Rockstar likes money. Obviously, they do, they’re a business. I’m saying this isn’t new. They’ve always launched console first. This is just how Rockstar operates.
  • Recent Achievements

    • First Post
      AndreaB earned a badge
      First Post
    • Week One Done
      Huge Trailer earned a badge
      Week One Done
    • Week One Done
      Classifyskilleducation earned a badge
      Week One Done
    • One Month Later
      eurospharma62 earned a badge
      One Month Later
    • Week One Done
      With What earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      570
    2. 2
      +Edouard
      178
    3. 3
      PsYcHoKiLLa
      74
    4. 4
      Michael Scrip
      68
    5. 5
      neufuse
      64
  • Tell a friend

    Love Neowin? Tell a friend!