help with crontab

Hi,
I’ve a problem with crontab,
I’d like to copy a folder (and subfolders) every 20 minutes,

I try

crontab 1,21,41 * * * * cp -RN /sourcefolder /targetfolder

but I get

crontab: too many arguments

Could someone help ?
Thanks in advance,
Flaviano

Depends upon the Qnx version you are using, so do a “use crontab” and check the options list for crontab. I think you are missing the command that crontab is looking to use. For example maybe you should try “crontab -e” to edit the crontab file, and then add the parameters and copy command you have listed.
ms…

Hi,
I’m using QNX Momentics 6.3.0,
I took the command I wrote on my previous message just from the help section.

Anyway I recognize I’m completely new to Unix and QNX,
I worked on PDP, VAX and PCs
so I miss basic knowledge.
Can you help me pointing on right direction ?

Thanks in advance,
Flaviano

I’m not using momentics, and most of my experience is with Qnx2 and Qnx4, so someone else can step you through this if they like.
If you got the command from help, then read more about crontab in the same help section.
You either have to create a new crontab file, or edit the existing one and add the parameter line you mentioned earlier, minus the ‘crontab’ at the beginning.
ms…

Flx: those two links should get you started:

qnx.com/developers/docs/mome … ontab.html

qnx.com/developers/docs/mome … /cron.html

Hi,

noc, as in my message I just took the command I’m using from the help section (the docs you point), thanks.
Anyway I ends up working, “my” problem was with use of crontab -e
I searched some help in Internet and found it uses vi, than I got a speedy vi course and got it

Flaviano