View Full Version : Crontab alternative
netwants 08-09-2003, 11:58 PM My Server has been trying to set up a crontab to run a file on my Control Panel every day at one minute past midnight, but after 2 weeks still can't get it to work.
I'm wondering if there is any way I can do this myself from my Control Panel as I don't have, or normally need, shell access.
I know it can't be a crontab, but is there any other application I could use ?
Hope you can help,
Regards,
Andy.
admin0 08-10-2003, 04:39 AM You can perhaps use php/perl to call "at" command if that is enabled.
netwants 08-10-2003, 05:06 AM Thanks admin0, but I don't know what an "at" command is and can't find anything on MySql to help.
I do have some php files though - is that what you mean by "enabled" ?
Sorry if I appear a bit simple, but I've had no programming experience.
Cheers,
Andy.
sprintserve 08-11-2003, 11:43 AM What errors are you getting? Could you be setting up cron wrongly?
netwants 08-11-2003, 05:58 PM Hi sprintserve and thank you for your suggestion.
It's actually my Server who's having a problem setting up the crontab ( her 1st ) and I'll ask her to join this forum to solve the problem.
I have a file in my Control Panel which is saved as a web page and which I have to click on daily for emails to be sent.
A crontab or something similar I could do to send that file automatically every day would save me that work which is impossible if I'm away from a Computer.
Thanks again,
Regards,
Andy.
sprintserve 08-12-2003, 12:14 PM Can you explain "click on daily"? As in there's a form post button you have to click ?
What's your cron command that you used?
netwants 08-12-2003, 06:16 PM Thanks for your interest sprintserve and here is the info you requested:
I have a Classifieds site and advertisers are sent an email after 120 days to ask whether they'd like their ad continued.
The script for that is in a file in my Control Panel which I have on my favorites as a web page.
When I click on that page the script is initiated and emails to the correct people are sent out instantly with a copy to me.
I'd like those emails to be sent automatically at 1 minute after midnight daily.
The first 5 crontab fields are 1 0 * * * but I'm not sure of the file address my Server has used.
In the file the top line is: #!/usr/local/bin/php ( html stripped ) so I imagine that's the crontab 6th field, but something doesn't work.
Hope this helps you help me !
Regards,
Andy.
MarlboroMan 08-13-2003, 02:23 PM Make sure that's the actual path to your PHP binary.
Second, throw a -q on the end of the path, for quietness.
Third, put > /dev/null 2>&1
at the end, so any output gets thrown in the bucket. crontab doesn't really like scripts that produce output.
netwants 08-14-2003, 06:11 AM Thanks MarlboroMan and I've forwarded your suggestions to my Server.
She did mention today that crontab seems difficult using a php file and is considering going the cgi or perl route.
I'm amazed that there isn't a little program out there which a site owner can use to send out files at a particular time as it seems such a sensible idea ! ( I've spent hours on Google looking for it without success ! )
Thanks again,
Regards,
Andy.
Dylan 08-14-2003, 10:50 PM alternative
www.fastcron.com
netwants 08-15-2003, 06:15 AM Hi Dylan and thank you for your suggestion.
I've had a look at fastcron but am concerned that there are no instructions at all !
I'd like to choose 1 minute past midnight GMT on every day of every month, but that doesn't seem to be possible as the only choices are hour/date/day/month which would be fine for "one off" sends, but no good for my requirements.
Am I missing something ?
The site idea is very good but needs a lot more options and a help page.
Thanks again Dylan and I look forward to your further input and help.
Cheers,
Andy.
GWDGuy 08-16-2003, 02:44 PM why not try smarterscripts.com and use the perl fakecron.. It is very easy to run.. Just upload, set the time you want the cron to run and put the "trigger" on a busy page on your site.. the trigger will activate the cron which will send the command at the time you want.
Robert
netwants 08-17-2003, 04:06 AM Thanks Robert, but fakecron needs to be on a page which is looked at "at least once every minute" and I don't have enough traffic to guarantee that figure.
Whatever I do has to be accurate with only one email sent to each recipient every day, otherwise I may appear to be spamming them.
Cheers,
Andy.
|