Off-Topic > Off-Topic - Tiny Tux's Corner
[Solved] Learning Cron
gerald_clark:
I have "export EDITOR=vi" in my .ashrc, so you may be on to something.
remus:
Booting up with another computer using a stock tinycore 3.8.4 cd with bootcodes syslog cron
- Boot up is fine.
- running
--- Code: ---crontab -e
--- End code ---
from CLI fires up the GUI editor
------------------
The system I was actually testing is running tinycore 3.8.4 (NOT microcore), and is a headless server with no keyboard or mouse either.
I'm accessing it with putty and getting that error when i run "crontab -e" So I guess that its trying to edit crontab files with the gui editor, but is failing as I'm in a CLI via putty.
So I would guess that if i was using a microcore boot disc it would use vi and not the GUI editor. What do you think ?
gerald_clark:
I think you are correct.
remus:
I've been reading up about using cron, and think I may need some help.
I've created a basic sh script
--- Code: ---#!/bin/sh
echo "The date/time is : $(date)" >> timelog ;
--- End code ---
When I run the file from the cli it appends the current date/time to the file timelog
Now in order to test that i am learning how to use cron correctly, I want to make sure this happens every minute.
So I ran "crontab -e"
And created the following file
--- Code: ---SHELL=/bin/sh
PATH=/usr/sbin:/usr/bin
# Jobs
* * * * * sh /home/tc/update.log.sh
--- End code ---
I used nano to create "/etc/cron.allow" with the following contents
--- Code: ---root
tc
--- End code ---
And I monitor the contents of timelog with
--- Code: ---tail -f timelog
--- End code ---
However, the expected date/time info is not being appended to the file.
I have looked around on a few websites, and i'm pretty sure that I've got he correct cron format for a job every 1 minutes.
Your comments and suggestions are welcome.
gerald_clark:
And just where do you think "timelog" will be located?
Use an absolute path.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version