![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| crontab couldn't run through, help | duke0001 | UNIX for Advanced & Expert Users | 10 | 02-06-2008 03:22 AM |
| help with crontab | bob122480 | Shell Programming and Scripting | 3 | 01-22-2007 08:49 PM |
| Crontab | gen4ik | UNIX for Dummies Questions & Answers | 1 | 01-18-2007 07:26 AM |
| ftp and crontab | user` | Shell Programming and Scripting | 27 | 11-13-2006 08:02 PM |
| Crontab | lo-lp-kl | UNIX for Dummies Questions & Answers | 2 | 05-05-2005 06:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
crontab help
Hi All,
Please help me in understanding the crontab entries and also below queries 1. how can we set a crontab entry 2. from where the cronjob will run( if default) 3. you can we specify the location from which the cronjob should run. 4. how can we capture the output of the cronjob. Thanks Satish |
|
||||
|
crontab -issue
crontab if not specified will run fron root users account ,location as in which program u want to run or what please be more clear,the man pages will be good place to start with and also you can capture the output of crontab by redirecting the output to some file instead of /dev/null.
|
|
||||
|
Creating crontab! files! Who runs crontab?
Hi
If you want a specific user to run a crontab (root, myself, yourself, etc) then the easy way is to log into that users account and create the crontab entry: "crontab -e" This gives you YOUR OWN (or that users) crontab file to edit, using say "vi", or "gvim, whatever is the default editor. Save and exit the changes with: ":wq" from inside the text editor. Use "crontab -l" to view the YOUR OWN (or that users) crontab contents - without the risk of editing it. Bye GrahamB |
|
||||
|
Output from crontab
Hi Satish:
Your last question: how can we capture the output of the cronjob. Use the directional parameters "> $file" and/or ">> $file" for example. Anything that goes to stdout would then be routed to $file. Any other stdoutput would, for example go into the mail of the user who has called the crontab-job. Try something like this: Code:
10 4 * * * . ~/.bashrc; ${SCRIPTS}/backup_mysql.sh >> ${BACKUPS_LOG}/${HOSTNAME}_mysql_v${VERS}.script.log 2>&1
Above the redirection is to a log-file describing the overall performance of the program and the variable used by "./backup_mysql.sh". This logs data that would be of interest to the administrator, for example. Note: "2>&1" is also a redirection. Another story! regards GrahamB |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|