Looking for Cron information.
Once again, apologies if this is in the wrong thread.
Basically I am a complete n00b at unix, and have very little if no knowledge, however I need to learn about Unix, specifically Slackware. For the moment I am trying to find as much information as I can about cron, from start to finish. Can anyone give me information on how to make a cron job run a script every 15 minutes? From what i've read so far I am gathering that you write the following:- (pseudo code) Run every 15 minutes *script* located at/this/directory/place DONE No? Or do I write the script into a specific file that already says to run whenever. Thanks in advance LQ community. |
There's a lot of good information here. If you get stuck after reading some of those links, please ask again.
|
You would really do yourself a favour by search for standard reference documentation about things like this. There is a huge amount of information about cron, and most of it says that it's really basic, as it is. for example http://en.wikipedia.org/wiki/Cron tells you everything you'd ever need to know.
|
|
Is there a way to relate a cron tab to the apache process?
|
Hi,
Welcome to LQ & SlackwareŽ! There's loads of information available but the these specific links will aid you; SlackwareŽ Essentials SlackwareŽ Basics Linux Documentation Project Rute Tutorial & Exposition Linux Command Guide Utimate Linux Newbie Guide LinuxSelfHelp Getting Started with Linux Advanced Bash-Scripting Guide These links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links! |
In what way?
|
Well I am supposed to be putting together a web server in which people can sign up and create accounts to host websites from, a sort of free web host package system. But at the moment I want apache to have a crontab that runs every few minutes to make new users from a text file. Does it matter what user it's related to? Or can I just make my own user account do the cron? Apologies if I am not making sense.
|
Hi,
Quote:
Read! |
Quote:
I do it through a setuid'd script. (onebuck: I was aiming at the post above yours) |
Right, so I can have my own user account do the cron script. Cool.
Any by setuid'd you mean? I've only just about worked out how to view the crontab, now Im working on making it do something as a test! Not getting far! Edit: Ok i've managed work out to how to create a cron file for my user, however it doesn't appear to work. Most likely my syntax, could I have some suggestions as to what is wrong the following. Quote:
|
1. cron has a minimal env, so always use complete absolute paths to all cmds/files referenced.
2. You cat the contents of a file, you 'echo' strings, so your cmd would normally be more like echo "some string here" >> /home/you/file.txt However, you wouldn't put that in a crontab. The best thing to do is write a shell script and call that from cron. |
All times are GMT -5. The time now is 08:44 PM. |