help with a bash script
Travis Siegel
tsiegel at softcon.com
Tue May 22 23:06:33 EDT 2007
You can just about anything you like in a cron job. if it can run in
a script, it can run as a job.
Secondly, just run the program (use the whole path and don't rely on
the parcer of the interpreter to find it for you. I.E. /usr/bin/more
instead of just more.
This prevents hackers from overriding the programs being executed.
Also, when you put it in a cron job, the output of the job will be
emailed to root (unless you specify otherwise) so you'll know if it
worked or not.
But, most programs (and I'm sure appget is amoung them) have an error
code to determine if they exited successfully or not.
Simply test for the code after the program ends if you really need to
know, but it shouldn't matter, since you can view the output of the
job if so desired.
On May 22, 2007, at 8:53 PM, Scott Berry wrote:
> Hello guys and gals,
>
> One more question here. I want to create a bas script for my Dad
> which does the following:
> 1 Does apt-get update and when apt-get update gets done it knows
> that it has been completed successfully.
> 2. Do apt-get dist-upgrade and knows when it gets done.
> 3. Do an apt-get clean.
> Also for those who have more experience than me I have a question
> too. Is it wiser for me to run that in a shell console of it's own
> or just have him run that under gnome terminal. My goal at the
> very end is to cron this so this can run at night for him.
>
> Scottat updates can be
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
>
More information about the Speakup
mailing list