Running a command in regular intervals.
Connect to your server through ssh and enter
crontab -e
Now you can enter a command to run in the following format:
minute hour day month weekday command
For example:
0 2,18 * /usr/bin/lua /path/script.lua >> /path/script.log 2>&1
Will run the lua script script.lua every day at 2am and 6pm and log it's output to script.log.