crontab schedule help
Hi, all. I'm pretty new to Linux and am having trouble twisting the crontab to meet my needs. Could somebody help me out, please? I have a file that I have to back up to floppy the first Friday of every month only. What I have at this point is 0 15 1-7 * 5 find /documents/netinfo |cpio -o >/dev/fd0.
This is to be run at 3pm, but I get the horrible feeling that my command would cause it to be run on every day in the range of 1-7 - regardless of the Friday. I understand the fields are logically ORed and that makes life difficult. Thanks for the help. Kim |
The format is
min hour date month dow command You are saying 0 15 1-7 * 5 command which is at 3pm,on the 1st thru the 7th, of every month, on fridays only There shouldn't be a problem or just do 0 15 * * 5 command I believe if you add the v option to ur cpio command, you will get system mail showing you the file name that was archived. It is interesting that you are using cpio, since this looks like it will always overwrite the older file on the floppy, you could probably use tar, or even dd |
OK, so my crontab will work. If this was a real situation, I certainly wouldn't use cpio because it will overwrite the previous. This is a project I'm doing for college and cpio will work fine for them. Thank you so much for the clarification. :)
Kim |
All times are GMT -5. The time now is 04:53 AM. |