Get your Raspberry Pi to do stuff automatically with cron
Cron is a piece of software, written for unix systems, that is built into the Raspbian operating system and is used to schedule (automate) tasks to run at different intervals.
Launch Terminal to configure cron
Cron is configured via files called crontabs. Each system user can have own crontabs.
On prompt type:
crontab -e (edit crontab).
Usually your crontab already contains some lines that has been commented out using hashes (#) - examples
Scheduling a task: The m (minute), h (hour), dom (date of month), mon(month), dow (day of week). The * means any.
Write a new line:
45 7 * * * export DISPLAY=:0 && chromiumbrowser https://www.fooz.de
This line says at 7:45 on every day of every week in every month, run the command
export DISPLAY=0 && chromiumbrowser https://www.fooz.de.
export DISPLAY=:0 && is required to make sure cron displays the web browser on screen.
Now save your crontab (CTRL+O or CTRL+X) and you are done.
Sharing is caring, show love and share the thread with your friends.