Exec producer Dan Schneider had to keep a close eye on the clock when making his latest kids series.

In 2006, Nickelodeon and I wanted to develop a comedy vehicle for Miranda Cosgrove, the teen acting sensation who came to prominence as the younger sister (“Megan”) in another of my Nick live-action comedies, Drake & Josh.

So I wrote a script called Starstruck about an ordinary girl who becomes an overnight TV star. I gave the script to Marjorie Cohn, Nickelodeon America's executive vice-president, original production, who loved it. However, as we moved closer to making the show, both Margie and I agreed that my Starstruck pilot might be compared to another well-known TV series. I decided to start over.

With production eight weeks away, I sat in my den one night and brainstormed with my wife, Lisa Lillien, and Steve Molaro, with whom I regularly collaborate. As much as we had all liked the idea of Starstruck, we agreed that kids would consider it even cooler if Miranda played a girl who created her own show, as opposed to being cast in a TV show by adults. That's when I hit on the concept of iCarly.

In iCarly, lead character Carly (Cosgrove) and her sassy friend Sam (Jennette McCurdy) accidentally become internet stars. Their friend Freddie (Nathan Kress) records video of the girls being funny and silly together, and mistakenly uploads the footage onto the web. Carly and Sam's “show” becomes a viral sensation and suddenly, Carly, Sam, and Freddie find themselves with their own hit web show.

I wrote the new script quickly and gave it to Margie in January 2007. She commissioned 13 episodes and less than two months later we were shooting the first. By the time we were filming episodes two and three, Margie and others at the network were convinced of iCarly's potential and increased the order to 40 episodes.

We shot the show at Nickelodeon in a dedicated production studio called Sunset where I produced Drake & Josh. Some people who've worked at Nick on Sunset (which we call NOS) late at night say the building is haunted. It's definitely a bit old and creeky, but NOS is the perfect television production base as it's familiar to my production team and there are no worries about where to put the offices or whether the wireless internet will work. Also, the facility has a rare commodity in Los Angeles: a big parking lot.

On iCarly I work with a small team of four writers. The production schedule requires us to shoot three episodes in a row and then take a week off (called a “hiatus” week). The hiatus weeks give the actors a week off while the writers and I develop new stories and write scripts. This “three on, one off” schedule is typical of any multi-camera sitcom such as Friends or Seinfeld.

One of the most obvious challenges in making iCarly is working with kids. In California, kids are allowed to work for nine and a half hours a day, including lunch, meals, and schooling. These are rules we strictly abide by: our whole schedule is based on making sure the kids get proper amounts of schooling and are in and out of work on time.

These time constraints are probably the only thing that causes us stress as we have to make sure we film everything we need before the all-powerful clock ends our day. Luckily for us, our supervising producer, Robin Weiner, is a master of all the logistics that come into play when producing a TV show. Robin keeps everything running on schedule so we always get a great show in the can.

One of my major goals on all my shows is to keep the atmosphere on set calm and fun. I know what it feels like to work on a tense set where the people in charge are shouting, creating stress and anxiety. For me, that's no way to produce comedy. I want everyone in the studio to be laughing and having a great time because I feel those attitudes come across on camera. I love it when our guest stars stop to tell me they've had a wonderful time working on my shows.

When adults ask me whether my shows should be more educational, I always say no. Kids go to school for eight hours a day, then they have another four hours of homework every night and plenty of chores. So, I think it's great if I can give them a half-hour of pure enjoyment, fun and laughter. Education and chores are very important, no doubt - but so are ice cream and roller coasters.

iCarly is a Schneider's Bakery production for Nickelodeon. It airs on Monday 24 March at 5pm

Dan Schneider: My tricks of the trade

An awesome laptop (Macintosh only). Often, when I'm on set, I'm doing many things at once on my computer: taking notes on what we're filming, writing next week's script, watching a rough cut of an episode we've already shot, and casting actors for upcoming roles. I use my laptop so much I sometimes think it's going to burst into flames.

Robin Weiner, my line producer - she makes sure everything goes right, logistically. It's always a comforting feeling to know I can scream “Robiiiinnnnn!” at any moment and she'll be there to fix whatever needs fixin'.

I don't think about how kids in London or Berlin might react. I focus on making the best, funniest show I can.

A top-notch digital camera for taking fun behind-the-scenes pics.

A tazer, in case the actors forget their lines. I'm kidding! Calm down.