Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Ok, please I apologize in advance for my complete dumbness. I havent ever dealt with Linux before, so this whole thing is like complete greek to me.
I have a website that frequently relies on cron jobs to complete tasks. On our old hoster, I had the "Cron Manager" in the administrative suite. Unfortunately we've outgrown that hosting plan, and now moved to a VDS server. So I'm in a world I dont know. I asked my hoster how to create cron jobs and he stated I could use putty.
So, heres how far I got.
I downloaded putty and was able to connect via SSH to my website. If I type in any cron command (as I was trying to do this myself by google first) nothing happens. Im not sure if I have to be in a specific file, or what. Im so so confused.
I can post any other information that might be able to help me, but how to get that crontab command to work would be great. (Do I need to login a certain way, have certain permissions set, be in a certain folder?) That'd probably help immensly.
Again, Im so sorry for being a total Linux noob. Thanks in advance for any help!
I guess thats where Im getting confused. If I just log into putty and start at the prompt I start at and type crontab -l or crontab -e nothing happens. It just goes to the next line prompt. So Im wondering if I have to be in a certain file to view/execute crontab commands? I was able to check where the users and deny lists would be and there is none on my site.
To use cron, you will need to edit the file /var/spool/cron/h321760w and then type the command crontab at the SSH prompt. We do not provide any technical support for problems with cron, but it does work just fine.
So I do have that file, and I am able to edit it. What do I put in that file though? Say I have a php cron called cron.php I want to run every minute (just for example to get the hang of this).
Thank you all so much for the help!
EDITED TO ADD:
I did try to figure this out myself and I put this in the file:
Ok I had a small breakthrough! YAYYYYYYYYYYYYYYY (LOL Im a dork )
So if I go into my SSH and type /var/www/html/cron.php the sql query that I have in the file executes (Which just for testing purposes is as below
$update = mysql_query("UPDATE `test` SET `test`='5' WHERE `id`='1'");
So I know the cron can and does work. Now, what/where/how do I edit that stupid /var/spool/cron/h321760w file and what do I put in it? I tried editing it with my file editor to just reflect the cron ( * * * * * /var/www/html/184.108.40.206/crontest.php ) But alas that didnt work. Do I edit it through SSH with Putty?
Im so close Im finally not sitting here on the verge of tears. I just need to figure this last key out. I dont know if it helps, but Im on a VDS server which I guess is why the crontab -e didnt work? THANK YOU!