mafi127
October 19th, 2012, 08:59 PM
Hello.
I need to make a script to crontab what check one folder and copy to another but I want that a file what will be copyed will be copyed to folder what is named to current month.
right now I'm using this crontab script
find /media/-Arhiiv-/0day/2012/ -maxdepth 2 -mindepth 2 -type d -mtime -7 -exec cp -r {} /home/user/Dropbox/Share/ \;
but what i want to make is to use python code like
/home/user/Dropbox/Share/{{ now|formatdate('%Y/%m - %B')}}/
how can I make it work in crontab?
I need to make a script to crontab what check one folder and copy to another but I want that a file what will be copyed will be copyed to folder what is named to current month.
right now I'm using this crontab script
find /media/-Arhiiv-/0day/2012/ -maxdepth 2 -mindepth 2 -type d -mtime -7 -exec cp -r {} /home/user/Dropbox/Share/ \;
but what i want to make is to use python code like
/home/user/Dropbox/Share/{{ now|formatdate('%Y/%m - %B')}}/
how can I make it work in crontab?