Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cron Job

Status
Not open for further replies.

Netwrkengeer

IS-IT--Management
Apr 4, 2001
184
US
How do I setup a cron job?
I need to access my server remotely. Can I setup a cron job 'Via' Ftp, or do I need to telnet.

what information is required to setup a cron job.

and what is the format.

also can I ftp into my server and change the servers time.
Thanks
 
Is this cron supposed to run as root, or is it just a "user" cron?

Generally you don't enable cron jobs by FTP, but I suppose it is possible, if you give the FTP user access to the actual crontab file, but that is generally considered "bad Unix" since it opens up all sorts of potential security problems.

These sorts of jobs should really be done from an SSH command line in the system, with a program called. I wouldn't even recommend doing them with regular Telnet. Also, users don't even usually have read/write access to their own cron files, but must use the "crontab" utility (not /etc/crontab) which will take their input and create the appropriate file at /var/cron/tabs.

If you really need remote access to manage these sorts of things, and you don't want to use SSH, I recommend installing Webmin (it's in the FreeBSD ports at /usr/ports/sysutils/webmin). Webmin gives you a special SSL webserver at port 10000 (or any other non-standard port) with an amazingly complete system administration utility. It's not as good as learning to do the real command-line stuff, but it's definitely better than trying to configure your system with FTP.

As to the actual details of running cron, I recommend checking out the following link:
Actually, this site has some great tutorials on FreeBSD in general, including Webmin:
As to your second question, again it's one of those things that is changed from the command line. I doubt any sysadmin normally thinks about where the actual information to set the system time is, since it is never set "by hand". The "date" utility is the program to use here. Allowing the non-root FTP user to access such sensitive system files as this can also open up some potential security problems. If a hacker can easily change your system time, that can wreak havoc on whatever serious software or web app you are running.

May I ask what all this pertains to? I have never heard of anyone trying to change such things with FTP. Maybe you need to do some research into network programming, and remote procedure calls, etc...
 
Actually its probably simpler then you think, I bought some servers and hired a web development company 10 months ago, paid them some money and gave them my pseudo code. Then my funding fell through (when all the dot coms crashed) it seems investor's don't look at your revenue model when you can be stereotyped. Well I worked out a deal with the web developer's to keep my servers as collateral and finish the site while we go for more funding, (all the new investors want to see the program work). Anyway, the web developers lost most of their client's and told me they will get to it, when they have a chance, well they still haven't had the chance. So now I must learn "FreeBSD Unix, Php, MySql, and Sales" or I don't get funded. Anyway I'm a full time Network Admin for Aol-Time-Warner in Manhattan, I support Novell and NT, and do some Html, But Unix and programming is a long shot for me. But all I need is a demo then I get funded and then I can Hire real programmers to do the job right. So the only reason I need remote access to the servers is because I can never be at the console. It has nothing to do with the cron job or anything related to the program, just that I can only Telnet or SSH into my servers.

Thanks again
 
Well, if you can SSH into your servers, then you can change what you need with info from the links I gave you.

In general, if you want to learn FreeBSD, MySQL, PHP, then spend some time at:










If you want to learn Sales, attend any Microsoft developer's seminar. (Sorry, couldn't resist;-))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top