Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dynamically cron lines
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
newhouse
n00b
n00b


Joined: 01 Feb 2004
Posts: 13

PostPosted: Sun Mar 28, 2004 2:46 am    Post subject: Dynamically cron lines Reply with quote

Hello mates, i'm doing a software and I want to insert cron lines dynamically but I don't know how to do.

I know that to insert lines I have to use
Code:
crontab -e
command but i can't use it for a dynamical use.

Is there any file where I can insert lines like
Code:
echo "line that I want" >> cronfile


Thanks a lot
_________________
In the sky
together
To the night
Forever
Back to top
View user's profile Send private message
foton2
Guru
Guru


Joined: 23 Feb 2004
Posts: 347
Location: Prague, Czech Republick

PostPosted: Sun Mar 28, 2004 3:01 am    Post subject: Reply with quote

I think that you mean
Code:

/var/spool/cron/user_name

It is the place where crontabs are stored.
_________________
Pentium4 2.4Ghz 533Mhz, Intel® Desktop Board D845GEBV2 + LAN, 768MB DDR 266Mhz RAM, 80GB Seagate Barracuda 7200.7, NVIDIA GeForce4 MX 440, SB Live! 5.1, TEAC CD-552E, TEAC DW-548D, Packard Bell 1512SL Monitor, HP DeskJet 640C, Opti UPS PowerPS 800ps.
Back to top
View user's profile Send private message
newhouse
n00b
n00b


Joined: 01 Feb 2004
Posts: 13

PostPosted: Sun Mar 28, 2004 3:07 am    Post subject: Reply with quote

then, for what can I use /etc/cron.d/ directory???

I know that i can put allow an deny but can I use for insert files of cron???

Thanks foton2
_________________
In the sky
together
To the night
Forever
Back to top
View user's profile Send private message
newhouse
n00b
n00b


Joined: 01 Feb 2004
Posts: 13

PostPosted: Sun Mar 28, 2004 3:14 am    Post subject: Reply with quote

Another problem is that I can't enter to
Code:
/var/spool/cron/
if i'm not root, I don't want to change the permisions. Is this place the only place to put the crontabs????


Thanks again
_________________
In the sky
together
To the night
Forever
Back to top
View user's profile Send private message
foton2
Guru
Guru


Joined: 23 Feb 2004
Posts: 347
Location: Prague, Czech Republick

PostPosted: Sun Mar 28, 2004 3:18 am    Post subject: Reply with quote

Quote:
then, for what can I use /etc/cron.d/ directory

Don't know, don't use it.

I use only
Code:
 /etc/cron.daily/ .......hourly ......

and
Code:
crontab


But maybe you can put there some scripts ......but I am guessing.
_________________
Pentium4 2.4Ghz 533Mhz, Intel® Desktop Board D845GEBV2 + LAN, 768MB DDR 266Mhz RAM, 80GB Seagate Barracuda 7200.7, NVIDIA GeForce4 MX 440, SB Live! 5.1, TEAC CD-552E, TEAC DW-548D, Packard Bell 1512SL Monitor, HP DeskJet 640C, Opti UPS PowerPS 800ps.
Back to top
View user's profile Send private message
foton2
Guru
Guru


Joined: 23 Feb 2004
Posts: 347
Location: Prague, Czech Republick

PostPosted: Sun Mar 28, 2004 3:24 am    Post subject: Reply with quote

Quote:
Another problem is that I can't enter to
Code:
/var/spool/cron/
if i'm not root, I don't want to change the permisions. Is this place the only place to put the crontabs????


I am afraid that yes, it is the only place where you can put your crontabs.

You must use crontab if you are not root.
:(
_________________
Pentium4 2.4Ghz 533Mhz, Intel® Desktop Board D845GEBV2 + LAN, 768MB DDR 266Mhz RAM, 80GB Seagate Barracuda 7200.7, NVIDIA GeForce4 MX 440, SB Live! 5.1, TEAC CD-552E, TEAC DW-548D, Packard Bell 1512SL Monitor, HP DeskJet 640C, Opti UPS PowerPS 800ps.
Back to top
View user's profile Send private message
KingTaco
Developer
Developer


Joined: 22 Aug 2003
Posts: 207
Location: Bay Area, CA

PostPosted: Sun Mar 28, 2004 4:42 am    Post subject: Reply with quote

you can do it in 2 steps.

Code:

$ echo "* * * * *   do_something_here" > /tmp/crontab
$ crontab /tmp/crontab


you could put this into a shell script and use that.
_________________
Explaining the obvious to the oblivious.
Adopt an unanswered post today -- https://forums.gentoo.org/search.php?search_id=unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum