I use fwbackups to set up sets of backups.
This application let us set a cron to be executed, here each day of each month at 16:30.
But I have to set it manually… cron won’t execute this.
The script (bash) is put in /usr/bin… and have the execution permissions.
#!/bin/bash
echo "Sauvegardes des travaux et du répertoire netbeans..."
/usr/bin/fwbackups-run -l 'travaux'
/usr/bin/fwbackups-run -l 'netbeans'
echo "...done !!"
The crontab -e shows:
30 16 * * * /usr/bin/backupz.sh
With a new line at the end of the line…
How can I make it run at 16:30 each day of the year ??
Please always show the part of the computer session complete. That is prompt, command, output (the only thing we seem to have here) and the next prompt. Like this:
henk@boven:~> crontab -l
no crontab for henk
henk@boven:~>
Now a lot of information is lacking. Also saying : “The script (bash) is put in /usr/bin… and have the execution permissions.” is only small talk. Please post:
ls -l /usr/bin/backupz.sh
cat /usr/bin/backupz.sh
To make us see for ourselves.
And in the same style:
crontab -l
Else we realy can not check if you did it correct and most of us will doubt that “cron does not work”.
Some remarks:
I personaly never would litter the system with my own applications in such a way. My advice would be to use /usr/local/bin instead of /usr/bin.
I would always redirect output of my cron runs to some place and not let cron put it in mails to the crontab owner (do you read those mails?). And some place might be /dev/null, or some log file dedicated to the application.
-rwxr-xr-x 1 root root 165 Oct 10 16:12 backupz.sh
**
cat backupz.sh
**
#!/bin/bash
echo "Sauvegardes des travaux et du répertoire netbeans..."
/usr/bin/fwbackups-run -l 'travaux'
/usr/bin/fwbackups-run -l 'netbeans'
echo "...done !!"
I read the mails. And I purge them when there is too much entries.
Firs a remark about posting those statements with their ouput. WWhat is esier that copy/pase the whole, like:
boven:~ # crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.lx6zuM installed on Sat Mar 19 10:30:17 2016)
# (Cronie version 4.2)
*/5 0-6,23 * * * /root/bin/nachtstop
*/5 * * * * /root/bin/wij
boven:~ #
As you see above we have also the prompt and the command. Same amount of “work” to post it (bit larger sweep with the mouse), but much more information. Now you pestered yourself by not including the commands, then posting those separate, making them bold for no reason) and we still do not have the prompts.>:(
I read the mails. And I purge them when there is too much entries.
I do not understand. You say you get mails from cron. And you main complaint is
Cron doesn’t work…
When “Cron does not work”, how can you then get mails?
And what is in those mails. You never told us!
BTW, I always would mention the full pathes in cron entries:
I got another server with fwbackups installed on it with cron that is working and the settings are the same in crontab and in the file system except that the target for the backup is not the same folder’s name.
I don’t know where to find any error messages as there is no more “messages” file in /var/log with journalctl.
I may redirect the output to a text file… but that sucks.
I tried also with full pathname it doesn’t fix the issue… as backupz is a symbolic link located in /usr/bin… I suppose there is no need to specify the full pathname as fwbackups never put it when updating crontab… fwbackups-run is also in /usr/bin.
Tried all advices with full pathnames – as other computer running 13.2 with fwbackup****s with cron that works, I tried the same settings (without full path).
For this computer I have to do backups manually… cron won’t work.
Both computers have the same settings (locations for the script, symbolic link in /usr/bin, …) , the only thing that is not the same is that on the computer with cron working the backup folder is located in the same partition. As the fwbackup manual process works I can’t believe this is a problem.
I will try something different but I have to announce cron.daily won’t work, I already tried…