Writing a crontab file

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Writing a crontab file

Postby laidlaws » Jul 23rd, '25, 22:14

(I must be losing my marbles. This is a simple task, that I have done several times before.)
I have a crontab file that I have saved as cron_root, as follows:
Code: Select all
0 */4 * * *    /usr/bin/rsnapshot hourly
50 23 * * *    /usr/bin/rsnapshot daily
00 23 * * 6    /usr/bin/rsnap/shot weekly

I want to enter the contents in /var/spool/cron/ to be executed by root.
Just copying and pasting the file shows its name, and not its contents.
Copying it line by liine into an empty directory isn't possible.
I probably need a file with "root" as the first line, in the directory /var/spool/cron, but I can't get the syntax right.
Any help appreciated.
laidlaws
 
Posts: 294
Joined: May 24th, '11, 04:58

Re: Writing a crontab file

Postby doktor5000 » Jul 23rd, '25, 23:26

Not sure what your actual problem is. As root run
Code: Select all
crontab -e
and append those 3 lines and then write and quit.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18073
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Writing a crontab file

Postby laidlaws » Jul 24th, '25, 11:45

Thanks, Doc. That answers my question.
laidlaws
 
Posts: 294
Joined: May 24th, '11, 04:58

Re: Writing a crontab file

Postby isadora » Jul 24th, '25, 12:12

Please don't forget to mark the topic [SOLVED], thanks ahead.
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2767
Joined: Mar 25th, '11, 16:03
Location: Netherlands


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest