Children of the Corn

In the fictional town of Gatlin, Nebraska, Job tells the story of how the town became a safe haven for a group of young cultists. The economy of the town is mostly agricultural, and the town is surrounded by vast cornfields. One particular year the corn crop fails and the people of Gatlin turn to prayer in an attempt to ensure a successful harvest. A mysterious boy preacher, Isaac Chroner (John Franklin), arrives and takes all the children of Gatlin into a cornfield to speak to them about the prophecies of a demonic version of the Judeo-Christian God called "He Who Walks Behind The Rows". Isaac, through his lieutenant Malachai (Courtney Gains), leads the children of the town in a revolution, brutally killing all of the adults in the town. Over the ensuing years, the children take any adults passing through as sacrifices.Three years later, Burt (Peter Horton) and his girlfriend Vicky (Linda Hamilton) pass through Nebraska while driving cross-country to Burt's new job as a physician in Seattle, Washington. They are traveling in their car and hit a small boy out on the highway. This boy was one of the Gatlin children who tried to escape the iron hand of the death cult. The couple place his body in the trunk. They encounter an old mechanic, who is little to no help, as the children of Gatlin have employed him to lead all adults passing through to the town, but they betray him and kill him anyway. Burt and Vicky finally end up in Gatlin, after searching for several hours for a phone.
A struggle ensues between the couple, "He Who Walks Behind the Rows" and the children as the couple are violently chased through the city. Burt and Vicky rescue Job and his little sister Sarah, who do not wish to be part of the cult. Vicky is captured by Malachai, and she is prepared as a sacrifice before they track down and capture Burt and the children.Meanwhile, Malachai and the others have grown tired of Isaac's arrogance. Assuming command over the children, Malachai orders Isaac to be sacrificed in Vicky's place. Night soon falls and Burt enters the cornfield to rescue Vicky. The sacrifice soon begins and Isaac is devoured by He Who Walks Behind The Rows. Burt arrives and battles Malachai, convincing the children that their minds have been poisoned and their humanity sacrificed in the name of their false god. As Malachai tries to regain control of the children, Isaac's re-animated corpse (apparently possessed by He Who Walks Behind The Rows) appears and kills Malachai, breaking his neck.
Soon, a terrible storm gathers over the cornfield and Burt and Vicky gather the children inside a barn to shield them from He Who Walks Behind The Rows' angry wrath. As the storm intensifies all around them, Job shows a Bible verse to Burt and Vicky that indicates that they must destroy the cornfield for the chaos to cease (it is revealed that "He Who Walks Behind The Rows" is really a demon). While filling the irrigation pumps with gasohol fuel, He Who Walks Behind The Rows lashes out at Burt, preparing to destroy the barn. However, Burt is able to spray the fields with the flammable liquid and lights a Molotov cocktail, tossing it into the field, burning it and seemingly destroying the demon.Burt, Vicky, Job and Sarah survive and are able to leave Gatlin as the cornfields burn. As Burt grabs the map they used to get there, a teenage girl who is a member of the cult jumps out at him from the back seat and attempts to stab him. Vicky knocks her out with the passenger door, and the four walk off into the distance to parts unknown

Question: what did the people of Gatlin turn to pray?
Answer: They prayed to ensure a successful harvest.