View previous topic :: View next topic |
Author |
Message |
newhouse n00b
Joined: 01 Feb 2004 Posts: 13
|
Posted: Sun Mar 28, 2004 2:46 am Post subject: Dynamically cron lines |
|
|
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 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 |
|
|
foton2 Guru
Joined: 23 Feb 2004 Posts: 347 Location: Prague, Czech Republick
|
Posted: Sun Mar 28, 2004 3:01 am Post subject: |
|
|
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 |
|
|
newhouse n00b
Joined: 01 Feb 2004 Posts: 13
|
Posted: Sun Mar 28, 2004 3:07 am Post subject: |
|
|
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 |
|
|
newhouse n00b
Joined: 01 Feb 2004 Posts: 13
|
Posted: Sun Mar 28, 2004 3:14 am Post subject: |
|
|
Another problem is that I can't enter to 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 |
|
|
foton2 Guru
Joined: 23 Feb 2004 Posts: 347 Location: Prague, Czech Republick
|
Posted: Sun Mar 28, 2004 3:18 am Post subject: |
|
|
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
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 |
|
|
foton2 Guru
Joined: 23 Feb 2004 Posts: 347 Location: Prague, Czech Republick
|
Posted: Sun Mar 28, 2004 3:24 am Post subject: |
|
|
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 |
|
|
KingTaco Developer
Joined: 22 Aug 2003 Posts: 207 Location: Bay Area, CA
|
Posted: Sun Mar 28, 2004 4:42 am Post subject: |
|
|
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 |
|
|
|
|
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
|
|