3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to make a Linux powered garden sprinkler system.

Step 6Scheduling...

Scheduling...

Crontab is a very easy and powerful way to schedule tasks in linux. You can use it to run any program at a predetermined time daily monthly hourly down to the second. I have mine set to be on for 5 min and off for 5 min.

Note. You must run the parcon executable as root. This means you must edit the root user's crontab file.

1. sudo su
2. enter password
3. crontab -e

Here is an example of my crontab file.

# m h  dom mon dow   command
30 7 * * 1,3,5 /usr/bin/parcon 1h 2h 3h 4h 5h 6h 7h 8h
35 7 * * 1,3,5 /usr/bin/parcon 1l 2l 3l 4l 5l 6l 7l 8l

40 7 * * 1,3,5 /usr/bin/parcon 1h 2h 3h 4h 5h 6h 7h 8h
45 7 * * 1,3,5 /usr/bin/parcon 1l 2l 3l 4l 5l 6l 7l 8l

50 7 * * 1,3,5 /usr/bin/parcon 1h 2h 3h 4h 5h 6h 7h 8h
55 7 * * 1,3,5 /usr/bin/parcon 1l 2l 3l 4l 5l 6l 7l 8l

00 8 * * 1,3,5 /usr/bin/parcon 1h 2h 3h 4h 5h 6h 7h 8h
05 8 * * 1,3,5 /usr/bin/parcon 1l 2l 3l 4l 5l 6l 7l 8l

10 8 * * 1,3,5 /usr/bin/parcon 1h 2h 3h 4h 5h 6h 7h 8h
15 8 * * 1,3,5 /usr/bin/parcon 1l 2l 3l 4l 5l 6l 7l 8l

20 8 * * 1,3,5 /usr/bin/parcon 1h 2h 3h 4h 5h 6h 7h 8h
25 8 * * 1,3,5 /usr/bin/parcon 1l 2l 3l 4l 5l 6l 7l 8l
 

« Previous StepDownload PDFView All StepsNext Step »
2 comments
Jul 18, 2010. 12:25 PMjinchuuriki says:
What programming language is this? I do not know anything about it.
Jun 26, 2011. 8:37 AMdcathey says:
It's crontab entries (see /etc/crontab or files in /etc/cron.d) for further examples. The comment "# m h dom mon dow command" provides the basic format:
m - minute after the hour
h - hour of the day
dom - day of month
mon - month of year
dow - day of week (0=sunday)
command - shell command to execute

So the first entry will execute "/usr/bin/parcon 1h 2h 3h 4h 5h 6h 7h 8h" at 7:30 every monday, wednesday, and friday

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
14
Followers
2
Author:bkimmons