Doomsday is the sixth episode of the eighth episode of the American television comedy series The Office and is the show's 158th overall. It was directed by Troy Miller and written by Daniel Chun. It originally aired on November 3, 2011.
In the episode, Dwight Schrute (Rainn Wilson) installs a Doomsday device that will fire all of the employees and effectively close down the branch if they make too many mistakes. Meanwhile, Gabe Lewis (Zach Woods) attempts to court the new warehouse worker, Val.
"Doomsday" received mixed-to-positive reviews from critics, with some reviews critiquing the episode's resolution. According to Nielsen Media Research, the episode was viewed by 6.15 million viewers and received a 3.2 rating/8% share among adult between the ages of 18 and 49, marking an increase in the ratings from the previous episode. The episode ranked third in its time slot and was the highest-rated NBC show of the night.
In the cold open, Andy (Ed Helms), to commemorate and "bring closure" to end of each work day, sings "Closing Time", much to the dismay of his visibly annoyed co-workers. Andy, frustrated that no-one but he and Erin (Ellie Kemper) enjoy the tradition, starts to scold the workers until Stanley (Leslie David Baker) comes in happily singing the song alongside him.
When Robert California (James Spader) confronts Andy about the number of mishaps and blunders made in the office, Dwight (Rainn Wilson) devises a system to find mistakes made by employees in the office. To improve efficiency, he installs a "doomsday device" that will send incriminating emails to Robert California (James Spader) if they make five mistakes in one day, effectively causing them to lose their jobs. After only one day, however, the group manages to make five mistakes, and Dwight reveals that the emails will be automatically sent to California at 5:00 pm. Andy pleads with Dwight to deactivate the machine, but Dwight refuses, belittles the rest of the office staff for being so careless, and retreats to Schrute Farms.
After Dwight abandons the group, Andy tasks Pam (Jenna Fischer), Oscar (Oscar Nunez), Erin, and Kevin (Brian Baumgartner) to try and change Dwight's mind. The group find Dwight digging a horse grave and offer to help him out. Andy tries to talk to Dwight about deactivating the machine, but Pam consistently quiets him, saying she knows Dwight will come to understand if they aren't pushing it. After complimenting Dwight numerous times and having a small meal, Pam makes a joke that emphasizes that everyone is human and makes mistakes. Dwight, after hearing this, deactivates the machine after the party leaves Schrute Farms. Meanwhile, Jim (John Krasinski) is tasked with tracking down Robert at a squash court and intercepting the doomsday emails before California has a chance to view them. To distract him, Jim plays several games, demonstrating his complete lack of skill at squash. Eventually, he is discovers that the e-mail has not come through, and prepares to leave, but Robert makes him stay and continue playing.
Meanwhile, Gabe (Zach Woods) unsuccessfully tries to strike up a relationship with a new warehouse worker, Val (Ameenah Kaplan). Gabe believes that he and Val have a connection, and constantly pursues and tries to impress her throughout the day. Darryl (Craig Robinson), observing Gabe's pitiful attempts, tries to imply that Val doesn't feel the same way, but to no avail. When Gabe does ask Val out, she politely declines and says she does not date co-workers at all. Darryl hears all of this and decides he won't pursue Val either.
- Andy sings "Closing Time" by the American alternative rock band Semisonic in the end of every workday.
- Andy says Oscar is "the Sex & The City gang", referring to the group of girlfriends in the HBO comedy series.
- Tweedledee and Tweedledum have become slang for any two people who look and act in identical ways, generally in a derogatory context. Andy calls Kevin "both".
- Iron Chef is a cooking show.
- Jim and Darryl talk about the 2011 NBA lockout.
- Jim jokes that Robert's favorite songs are "Creep" by TLC and "Creep" by Radiohead.
- Dwight compares himself to Doctor Frankenstein and Doctor Jekyll.
- Angela says "Where were you two hours ago, Beautiful Mind?", referring to the 2001 American biographical drama film based on the life of John Nash, a Nobel Laureate in Economics.
- Gabe asks Val to a date in the cemetary, further emphasizing his love for all things scary.
- Rainn Wilson as Dwight Schrute
- John Krasinski as Jim Halpert
- Jenna Fischer as Pam Halpert
- B.J. Novak as Ryan Howard
- Ed Helms as Andy Bernard
- and James Spader as Robert California
- Leslie David Baker as Stanley Hudson
- Brian Baumgartner as Kevin Malone
- Creed Bratton (actor) as Creed Bratton
- Kate Flannery as Meredith Palmer
- Mindy Kaling as Kelly Kapoor
- Ellie Kemper as Erin Hannon
- Angela Kinsey as Angela Martin-Lipton
- Paul Lieberstein as Toby Flenderson
- Oscar Nunez as Oscar Martinez
- Craig Robinson as Darryl Philbin
- Phyllis Smith as Phyllis Vance
- Zach Woods as Gabe Lewis
- Michael Daniel Cassady
- Mike E. Winfield
- Tom Virtue