crontab files

jimnyc

...
Aug 28, 2003
19,773
271
83
New York
Anyone know of an acceptable "notepad editor" that will be suitable for making the crontab files?

Here's why I ask:

I've been using the same cron job on my host to run various tasks, and they just stopped running about 3 days ago. The first day I let slide, then called tech support to find out why after the 2nd day (I don't have any shell access)

I was told they were performing upgrades and they should be working within an hour. Then I called back and they said 6 hours. They still weren't working today. Mind you, NOTHING was changed on my end the entire time.

I called yet again today and a supervisor explained to me that I am not the only one having issues and they are working on it. He promised personal service and it would be working by the end of the day.

Well, he did get my jobs to start running again, but they laid the blame on me. They now say everything is fine, and has been, on their end. They said they found line breaks (a few enter strokes) at the end of my commands, and this is only visible when viewing the crontab file via Unix.

I don't understand their explanation as this is the same file that has been running flawlessly for quite some time. Anyway...

Anyone know of an editor that will allow me to see ALL of a text file, as he say's Unix does?
 
Hey, just open a session and do it in VI. If your just editing crontab files it'll take thirty seconds to learn the commands, type vi? and look for a tutorial.
The beauty of vi is it runs natively. You never have to worry about passing over inadvertent formating commands (and your server is allready running it.) The final bonus is it impresses dinosours like me when some bright guy shows valuable cross platform skills
 
Downloaded UltraEdit32 and am going to toy with it, looks pretty good so far. Got another really good one from Eric. Looks like the UltraEdit costs $$$!! I hate having to pay. :D

I wish I could use the vi editor, I am actually familiar with it. Unfortunately, my host doesn't allow any other access than FTP for manipulating our files. They claim they got rid of shell and telnet for security reasons.

Thanks!
 
The host is full of crap. They just do not want the headaches of answer tech support calls concerning these services. Securing these services is not that difficult.
 
Not to mention they would save themselves calls anyway, for users that can't do their jobs properly without such access.

I'm going to switch hosts eventually, be assured I'll have a new list of features I need this time, proper access to my account for starters.
 
Ok, I think I finally got things working properly again. The changes they made on the back end that affected cron jobs must have also changed they way it reads the file.

I tried it with no line breaks and it wouldn't work.

I tried it with 2 line breaks (which is what my provider suggests on their support pages) and it wouldn't work.

Tried 3 lines and it wouldn't work.

I then tried it with * * * * * at the beginning with just one line break, and it started running every minute. I then changed it to 55 5 * * * and it ran as scheduled at 5:55am Cali time. Appears the one line break is what made the difference.

BTW - I did use UltraEdit32 to create the crontab, so thanks, dijetlo! (although I won't pay for a program just to simply create an occasional text file)
 
>>although I won't pay for a program just to simply create an occasional text file<<
I agree, but then I'm not wrangling with uncooperative UNIX admins. :D
Which prog does eric recommend, I'd like to take a look at it?
 
I use UltraEdit myself, Jim, and I can't live without it. The last I heard, UE is the only product the guy makes, and he's obsessed with quality. It's well worth the price.
 
Originally posted by SinisterMotives
I use UltraEdit myself, Jim, and I can't live without it. The last I heard, UE is the only product the guy makes, and he's obsessed with quality. It's well worth the price.

I must admit, it did solve my problems in the short term. I've since moved to a host where it's no longer necessary. Sadly, my free trial has ran out and I can't see paying to register when I'll rarely, if ever, use the program.
 
Originally posted by jimnyc
Sadly, my free trial has ran out and I can't see paying to register when I'll rarely, if ever, use the program.

I have one word for you: warez. ;)
 
Speaking of crontab files, how does a user with a hosting account go about setting up one? I can usually get the sysadmin to add whatever lines I want to the system crontab, but I'd prefer to make a separate one for my account rather than wait days for him to get around to adding or editing a line. It's an instant gratification thang.
 
Originally posted by SinisterMotives
Speaking of crontab files, how does a user with a hosting account go about setting up one? I can usually get the sysadmin to add whatever lines I want to the system crontab, but I'd prefer to make a separate one for my account rather than wait days for him to get around to adding or editing a line. It's an instant gratification thang.

Mine was on a shared hosting account. You just need to place a file called 'crontab' in the cgi-bin directory (no extension on the crontab file). I believe the crontab daemon checks every file every minute to see if any processes need to be ran.

You'll need to create the file in a text editor locally, then upload via FTP as ascii into the cgi-bin directory. This is how we got to this thread. Simple notepad and other programs sometimes leave junk code in the file that Unix has trouble reading. I had to hit enter like 3 times after my lines of code or my file wouldn't run at my old host. Unfortunately, the extra line breaks confused Unix and I got errors when it tried to run. Never had that problem after using UltraEdit.
 
I don't have a cgi-bin folder. I just have my home folder ("/home/username") with the two subfolders "Desktop" and "public_html". I just stick my PHP scripts where I want them in the directory tree under public_html, and they work.
 
Originally posted by SinisterMotives
I don't have a cgi-bin folder. I just have my home folder ("/home/username") with the two subfolders "Desktop" and "public_html". I just stick my PHP scripts where I want them in the directory tree under public_html, and they work.

Can you create a cgi-bin folder at the same level as the public_html?

What control panel are you using? The version I use has a crontab editor built into the host.
 
That was going to be my next question. If I create the cgi-bin folder in my home directory, will Apache automatically recognize it as a cgi-bin?

There's a "kontrol-panel" file in the Desktop folder, which I assume has to do with KDE, but I've never used it. I just use WS_FTP and UltraEdit to transfer files. The server does support SSH or whatever the secure Telnet thing is called, but I haven't used that either.
 
I believe it should. I think the daemon will look through all directories at that level. Usually crontab goes into the cgi-bin directory for security reasons. This folder won't be able to be read except internally, whereas everything is pretty much readable in public_html.

Do they have decent support where you are at? You may want to shoot them an email and verify the particulars. Probably save you lots of headaches and testing!
 
Originally posted by jimnyc
This folder won't be able to be read except internally, whereas everything is pretty much readable in public_html.

What should I chmod the cgi-bin folder to?

Originally posted by jimnyc
Do they have decent support where you are at? You may want to shoot them an email and verify the particulars. Probably save you lots of headaches and testing!

It depends on whether I can reach him via IM or not. If I try to get anything done via e-mail, I can send him messages for months and never get a response. :laugh:
 

Forum List

Back
Top