The Machinist is a 2004 psychological thriller film directed by Brad Anderson and written by Scott Kosar. It stars Christian Bale as the title character, a machinist struggling with guilt, paranoia, and delusion after being unable to sleep for an entire year. Jennifer Jason Leigh, Aitana Sánchez-Gijón, John Sharian, and Michael Ironside appear in supporting roles.