|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I need help with crontab!!!!!
okay, i want to write a script to back up a data file i created
this is what i have so far #!/bin/bash 45 10 * * * * /user/bin/backup file.data (i call this file backupfile) and thats it for the script.... then i got to the command line and type "crontab backup" when its time for the cron to execute, i get a email error stating your cron job produced the following output: sh: core: execute permission denied i do not understand what is going on...can someone please help! |
|
#2
|
||||
|
||||
|
I think you misunderstand how crontab works. You need to edit /etc/crontab and add this line...
45 10 * * * /user/bin/backup This will run the command /usr/bin/backup at 10:45 each day. You should google search for crontab and it should answer most of your questions. Crontab is a very well-documented feature. |
|
#3
|
|||
|
|||
|
donboy
>>>>>You need to edit /etc/crontab and<<<<< new feature ??? i use 'crontab -e' and the files are in /var/spool/cron/crontabs/<username> my (old) solaris 5.9 says: don't edit this files by hand, but use the crontab cmd ![]() infinite: #!/bin/bash 45 10 * * * * /user/bin/backup file.data that's definitely wrong a) remove the bash line b) remove ONE star (read man pages) c) check permissions of exec filename d) try to be compatible, bash is not i suppose the core is due to the superfluos '*' Last edited by guggach : October 22nd, 2004 at 01:57 AM. Reason: typo |
|
#4
|
||||
|
||||
|
>> i use 'crontab -e'
Yeah, that works too. I'm on RH/Fedora and there is an /etc/crontab where you can add them too. |
|
#5
|
|||
|
|||
|
donboy
/etc/crontab is not unix, that's all. |
|
#6
|
|||
|
|||
|
Hi,
Don't use "bash" in crontab entry. You can use bash in your backup script file. Also use "crontab -e" to edit ur crontab entry as suggected ib above threads. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > I need help with crontab!!!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|