GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   My rendevous with Crontab :-) (https://gfy.com/showthread.php?t=201279)

Juicy D. Links 11-24-2003 06:14 PM

My rendevous with Crontab :-)
 
Yo

If i do crontab cronfile it adds the shit to my cron and doesnt delete what in there right?


<<<<<<<<<<,Semi Server nOOb

fletcher 11-24-2003 06:26 PM

Run "crontab -e"

doober 11-24-2003 06:32 PM

format crontab:

mryellow 11-24-2003 06:35 PM

usage: crontab [-u user] file
crontab [-u user] { -e | -l | -r }
(default operation is replace, per 1003.2)
-e (edit user's crontab)
-l (list user's crontab)
-r (delete user's crontab)

-Ben

JDog 11-24-2003 06:36 PM

And does any of this help juicy. Juicy I'm not for sure. Make a copy of your current one, put it in your cron file, and then import the cronfile :)

jDoG

goBigtime 11-24-2003 06:38 PM

do this:


bash

VISUAL=pico ; export VISUAL

crontab -e


then setup your cron and hit CTRL+X to exit and save it.

fuzebox 11-24-2003 06:38 PM

Yes, it will overwrite what is already there (as per what mryellow posted from the help output).

Just use crontab -e and put in new entries yourself.

Mr Pheer 11-24-2003 06:39 PM

say you name your crantab file "cron"
then you do: crontab cron

it will overwrite whatever you had there before as long as its the same filename

fuzebox 11-24-2003 06:39 PM

Quote:

Originally posted by goBigtime
do this:


bash

VISUAL=pico ; export VISUAL

crontab -e


then setup your cron and hit CTRL+X to exit and save it.

There's no excuse for not learning the basic vi commands :)

arial 11-24-2003 06:42 PM

crontab -e should do it... this is why cPanel always comes in handy.

fuzebox 11-24-2003 06:42 PM

Quote:

Originally posted by MrPheer
say you name your crantab file "cron"
then you do: crontab cron

it will overwrite whatever you had there before as long as its the same filename

Actually it will overwrite it regardless of what the filename is. The file argument you give the crontab command is just for input sake... Your real user's cron data is stored somewhere else on the system, such as /var/spool/cron under most Linux distributions, or /var/cron/tabs under FreeBSD.

fletcher 11-24-2003 06:43 PM

Quote:

Originally posted by fuzebox


There's no excuse for not learning the basic vi commands :)

Haha. :thumbsup

Juicy D. Links 11-24-2003 06:44 PM

crontab -e it is

Any good resource for the edit commands?

JDog 11-24-2003 06:44 PM

Quote:

Originally posted by fuzebox


There's no excuse for not learning the basic vi commands :)

Agreed! Should learn VI, or know some of the commands!

jDoG

Mr Pheer 11-24-2003 06:45 PM

Quote:

Originally posted by fuzebox


Actually it will overwrite it regardless of what the filename is. The file argument you give the crontab command is just for input sake... Your real user's cron data is stored somewhere else on the system, such as /var/spool/cron under most Linux distributions, or /var/cron/tabs under FreeBSD.

interesting... explains why some of my shit dont work

fuzebox 11-24-2003 07:19 PM

Quote:

Originally posted by juicylinks
crontab -e it is

Any good resource for the edit commands?

Well you can set your editor like goBigtime described above, or...

Read this: http://www-jics.cs.utk.edu/I2UNIX/un...de/node14.html

Basically when you open it you're in naviagtion mode, to enter any text you hit "i" for insert (or "a" for insert after the current letter, "o" for insert on the next line, etc). You type your text, then hit escape to go back into navigation mode. To delete characters, type "x". You can navigate the cursor around with the arrow keys. Once you're done, type ":wq" to (w)rite the file and (q)uit.

Phew.

mryellow 11-24-2003 09:00 PM

Tip:

You can add a mailto line at the top and the cron will email you
the output from the scripts. This makes it easier to debug what
this are working and not.

[email protected]

-Ben


All times are GMT -7. The time now is 12:37 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123