setup cron job to copy files

sorry i am very new to linux but need to copy files from one directory to another  every other day @ 1830

the cp command i have work out is

cp -f /var/www/html/admin/modules/core/etc/* /home/support

how do i create a cron to do this
LVL 31
James MurrellProduct SpecialistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

to create a cron job you need to type

contab -e


have to give time when you want to copy .

0 22 * * 0 cp -f /var/www/html/admin/modules/core/etc/* /home/support

it wil copy your files at 10  pm every day

just chagne the type to test as your need

to add a crontab job, run

export EDITOR
crontab -e

the above will give you temp file to edit using vi editor (with your current crontab jobs, if any)

add line similar to

30 18 */2 * * /usr/bin/cp -f /var/www/html/admin/modules/core/etc/* /home/support

save and quit
add the line t

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James MurrellProduct SpecialistAuthor Commented:
add the line t ???
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

sorry, it is typo (cut and paste problem)

i just realized my answer was not fully correct because i didnot add /usr/bin before cp

anyway, just a quick add: if you use /usr/bin cp -f  : it might not work because some time cp command is attached with only /bin directory.

to find out where is cp : whereis cp  

James MurrellProduct SpecialistAuthor Commented:
cheers that was a life saver
Deepak KosarajuDevOps EngineerCommented:
set the cron job under /etc/crontab as
30 18 */2 * *  /bin/cp -f /var/www/html/admin/modules/core/etc/* /home/support
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.