Timing Bash scripts

Asked by Brewster Malevich

I am new to scripting. On my laptop, I have a simple 'wget' bash script embedded in my home directory. I would like this script to run (not as root!) at 9:54am on everyday in October. I am told that I shouldn't be using cron because I often turn my laptop off and on. What is the simplest/best way for me to time this script?

Thanks for helping a n00b.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Brewster Malevich
Solved:
Last query:
Last reply:
Revision history for this message
Alex Rampp (bitschupser) said :
#1

A simple way is to use the at command. Look at the manpage (man at) for further information.

Greets

Revision history for this message
Brewster Malevich (brews) said :
#2

This is a pretty cool command! but I don't think there is a way for me to repeat the command everyday for this month.

Any other idea?

Revision history for this message
Wim (launchpad-xs4all) said :
#3

the "at" command is used to do smoething ONCE in the future,
the "crontab" is made to repeat a command every hour, of every day...

in a terminal window, just enter the command

   crontab --help

and look carefully;
with
    crontab -e

you start the vi-editor and can add your command;
a line starting with # is comment
eveyr other line has to contain next items, separated with <SPACE> or <TAB>

minute hour daynumber monthnumber day-in-week commando-with-complete-pathname

any items, that are not usefull, fill with *
e.g.
  12 * 25 * * /home/action.script
will start /home/action.script every 25th of the month at every 12 minutes after the hour...

Please write here if this solves your problem
Meer uitleg kan volgen, laat hier weten of het

Revision history for this message
Brewster Malevich (brews) said :
#4

I've been having alot of trouble with crontab, it's set right but I think its a problem with my script. Now, the problem has been solved.