How do I start a task and have it run for a set amount of time? I have a project where I need to turn a 24V solenoid on for a set amount of time, then have it turn off. I am rather new to Arduino and not certain how to do this or really where to start. Ideally the time would be displayed on a LCD screen as well but this is purely aesthetic. Any advice, help, examples ect would be appreciated. Thanks!
Use millis();

Record millis() in a long variable like below when the solenoid starts
StartTime = millis();

to switch off solenoid after 60 seconds you may do 

if ( (millis() - StartTime)/1000 ) &gt;  60
{
   // switch off solenoid
}


enjoy coding.

There are other ways as well to achieve this... but this is being easiest  and you don't have to wait caused by using delay();