Help - Search - Members - Calendar
Full Version: Complicated Crontab
Linuxhelp > Support > Technical Support
Robert83
Hi,

this is what I'm trying to do

on Avgust 16 , Monday (this year) I want to move /etc/smb/smb.conf to /home/smb.conf

will this do ?

30 * 16 Avg Mon * root mv /etc/smb/smb.conf /home/smb.conf

this also removes /etc/smb/smb.conf right ? (with the move command)

Sincerely
Robert B
hughesjr
You would use at to do that ....

The command would be:

at 10am aug 24 (and then press enter)
/bin/mv /etc/smb/smb.conf /home/smb.conf (then press enter)
(then press ctrl-d to close the at prompt)

Then do atq and press enter and you should see this:

13 2004-08-24 10:00 a root

(your job may not be number 13 ... but the rest should be the same)

If you want to remove the job, do:

atrm 13
Robert83
Thank you very-very much!,


do I need to have crontab enabled for at to run properly ? (currently crontab is off)


Sincerely
Robert B
hughesjr
yes ... crontab must be on ... and also:
QUOTE
      The superuser may use these commands in any  case.  For  other  users,
      permission  to  use  at  is  determined  by the files /etc/at.allow and
      /etc/at.deny.

      If the file /etc/at.allow exists, only usernames mentioned  in  it  are
      allowed to use at.

      If  /etc/at.allow  does not exist, /etc/at.deny is checked, every user-
      name not mentioned in it is then allowed to use at.

      If neither exists, only the superuser is allowed use of at.

      An empty /etc/at.deny means that every user is allowed use  these  com-
      mands, this is the default configuration.


(This is for the redhat versions of at)
Robert83
Hi,

one more question,

do I need some aditional settings in crontab, like run at... or whatever command is required in order to be sure that at will complete the job when the date comes.


Sincerely
Robert B
hughesjr
Nope ... it should work.

Try the tests I posted in the other at thread to make sure it will work....
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.