Once we have created these programs, we need to create a simple cron file in the /etc/cron.d directory. The file specifies when the script is called and with what permissions. For example, here is the cron file code for lighton which turns the lights on at a specific time.
Cron files can have multiple jobs in them, and you can edit the file and the changes take effect without rebooting the machine. So, with one file, you can create a situation where the lights go on at sunset, off 4 hours later and then maybe you turn them off again at midnight, just in case someone turned them on with a local switch or web page call and forgot to turn them off.