Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

How to write a Cron?

It looks pretty simple, but I'm having a hard time figuring out how you actually do it...

First of all, can I use Notepad++
Secondly, after you finish writing your script, do you save it and upload it to var/spool/cron
What's the file extension of a cron
Can I practice this on my local environment before I go live
If I open up a cron directory on my server, should I expect to see some scripts in that directory

Basic, basic questions, but I'm confused when I see "command line" verbiage and, what appears to be a straight ahead text editor.

Any direction would be appreciated.

I believe I'm on a Linux server based on the fact that I see var/spool/cron and I'm assuming that's consistent with Linux architecture. But I've never used command line, so feel free to break it down to offensively simply terms if that's what it takes.

Thanks!
SOLUTION
Avatar of Radek Baranowski
Radek Baranowski
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

Guys, I'm stoked because your counsel combined with everything else that I've googled convinces me that this is pretty straight forward.

The syntax that I'll need is probably the least of my worries, as it's just going to be something that runs early in the morning, once a day.

But here's where I get lost, simply because it's a new environment. When I look at articles such as https://help.ubuntu.com/community/CronHowto and http://artoflinux.blogspot.com/2009/08/cron-jobs-tutorial-for-beginners.html, the code is easy, but I'll see references to "nano" and "vim." I'm getting the impression that, while the code is intuitive, I'm using a different kind of interface to create the command in that it's not a text editor per se, correct?

I'm looking at links like this: http://www.thefreecountry.com/webmaster/sshandtelnet.shtml

So, imagine you're looking over my shoulder and once you've gotten over the abundance of ignorance that charcterizes this poor fool trying to figure all of of this out, how would you guide me as far as:

the interface I need to use
explaining how it differs from a program like Notepad++ and why I won't need to upload anything via an
ftp protocol (how am I popping the hood on my server?)
is is possible to test this on my local enviornment before I go live on my server
"nano" and "vim" are text editors.  Any Unix/Linux system can run 'cron'.  But like @Radek said, you use 'crontab -e ' to create your entry.  FTP isn't of any use.  I think there is more to it than just creating a file.  And I never thought the code was intuitive.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, guys!