On Fri, 09 Mar 2007, Roger Searle wrote:
> so now that I have my backup script files ready and functional from
> either the command line or mouse click, I want cron running them, so am
> doing "crontab -e" - i understand the format of crontab.  i restart the
> cron daemon or ensure that at least 2 minutes will pass before schedule
> runs.  however when the scheduled time has passed the expected file will
> not have been created.   i will have mail in var/spool/mail/roger saying:
>
>
> /bin/sh: /windows/E/admin/backup-test.sh: /bin/bash: bad interpreter:
> Permission denied
>
> alternatively i can use webmin to view the cron jobs and make it run
> "now" - the same error is returned.
> this will happen regardless of whether the cron job is run as roger or
> as root.
>
> plenty of references to this error in google but nothing that seems
> helpful - particularly since it will run from the command line and the
> suggestions are usually to do with permissions.  root and users both
> have execute permission to the file.
>
> any suggestions anyone?
Don't forget that:
 cron uses 'sh', as opposed to 'bash' as the default shell;
 scripts started by cron do not have any idea at all of a $PATH,
 you should be in the 'cron' group
 you should _not_ be mentioned in the /etc/cron.deny file

In the dim distant days past I seem to remember that there used to be 
a /etc/cron.allow file, but it's not on any of the machines to which I have 
access. Perhaps it's been replaced by the 'cron' group. Any Unix history 
gurus remember?

To get a file to execute on a desktop mouse click you need to make an iconic 
representation of a .desktop file. For KDE, do this:
RH mouse button on desktop background > Create New -> Link to Application
Dialog window pops up.
Type in the test for the new icon's label.
If you want to change the icon click on the cog-wheel and select one as 
desired.
Click on 'Application', and fill in the details.
Command means the name of the file you wish to execute. ( Must be in you path 
or the full path name )
For any application which needs a command line window to take keyboard input, 
click on 'Advanced Options' and click in the 'Run in Terminal' box.
Close the dialog windows, click on the new icon you have just made.
Watch your file execution and Feel Happy!

Doubtless the Gnomes will do it differently just to be different.
You'll have to consult with one of those Johnny-come-latelys for the details.

--
CS




Reply via email to