TotalChoice Hosting Family Forums: Php Cron Job - TotalChoice Hosting Family Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Php Cron Job makeing a cron job for WebCalendar

#1 User is offline   kingram Icon

  • Family Friend
  • PipPip
  • Group: Members
  • Posts: 44
  • Joined: 07-April 05

Post icon  Posted 18 December 2005 - 08:47 PM

:wallbash:
I am new to this and I do not know how to handle it.
I have installed webcalendar. and it is working however I am trying to make a reminder but the problem is that I can not understand the user manual.

The manual mentions that it should be php CGI cron job, and if I can not make it I should a server base cron job. Is there anybody who can give me the lead how to fix this. I am adding the instructions below:

To set this up in cron, add a line like the following in your crontab
* to run it every 10 minutes:
* 1,11,21,31,41,51 * * * * php /some/path/here/send_reminders.php
* Of course, change the path to where this script lives. If the
* php binary is not in your $PATH, you may also need to provide
* the full path to "php".
* On Linux, just type crontab -e to edit your crontab.

thanks for help, shahram

#2 User is offline   kingram Icon

  • Family Friend
  • PipPip
  • Group: Members
  • Posts: 44
  • Joined: 07-April 05

Posted 18 December 2005 - 09:45 PM

I just wanted to mention that I have added a cron job in the cpanel:

php -q /home/username/public_html/calendar/tools/send_reminders.php > /dev/null

I am not sure whether this will do the job or everything is in perfect order. Any suggestion would be great.

#3 User is online   TCH-Bruce Icon

  • Lead Forum Moderator
  • PipPipPipPip
  • Group: Admins
  • Posts: 21,247
  • Joined: 11-August 03

Posted 19 December 2005 - 07:54 AM

cPanel provides 2 ways of entering a cron job. If you are unsure of how to build a cron job I suggest using the STANDARD method and not the ADVANCED.

When you select the STANDARD method choose the following from the boxes provided.

Every 10 minutes in the minutes box
Nothing selected in the hours box
Everyday in the days box
Every Month in the months box
Every Weekday in the weekday box

For your job you can use this:
/usr/bin/php -q /home/your-cPanel-name/public_html/calendar/tools/send_reminders.php >/dev/null

Bruce Richards
Lead Forum Moderator
TotalChoice Hosting, L.L.C.
Webhosting by Total Choice Web Hosting - General Support Forum

I am the Lead Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.

#4 User is offline   kingram Icon

  • Family Friend
  • PipPip
  • Group: Members
  • Posts: 44
  • Joined: 07-April 05

Posted 19 December 2005 - 10:04 AM

Thanks. I will try and let you know if there is any problem.
Happy Holidays


View PostTCH-Bruce, on Dec 19 2005, 07:54 AM, said:

cPanel provides 2 ways of entering a cron job. If you are unsure of how to build a cron job I suggest using the STANDARD method and not the ADVANCED.

When you select the STANDARD method choose the following from the boxes provided.

Every 10 minutes in the minutes box
Nothing selected in the hours box
Everyday in the days box
Every Month in the months box
Every Weekday in the weekday box

For your job you can use this:
/usr/bin/php -q /home/your-cPanel-name/public_html/calendar/tools/send_reminders.php >/dev/null


#5 User is offline   kingram Icon

  • Family Friend
  • PipPip
  • Group: Members
  • Posts: 44
  • Joined: 07-April 05

Posted 22 December 2005 - 11:33 PM

I did so but no success so far. I was wondering if this can happen by enabling magic_quotes_gpc
"http://sourceforge.net/forum/message.php?msg_id=3486370" from server side.

Is there anybody who has any experince with webcalendar and run into the same problem?
Thanks

This post has been edited by kingram: 22 December 2005 - 11:33 PM


#6 User is offline   kingram Icon

  • Family Friend
  • PipPip
  • Group: Members
  • Posts: 44
  • Joined: 07-April 05

Posted 26 December 2005 - 01:46 PM

I could find the problem in source code and solved it but now I am facing a problem in cron job.

I am runing the php file with adress bar http://*****.com/calendar/tools/send_reminders.php
and it sends the reminders and I have set two cron jobs to verify whether it works or not but non works:

first one: * * * * * #!/usr/local/bin/php -q /home/ID/public_html/calendar/tools/send_reminders.php > /dev/null
second one: ***** /usr/local/bin/php -q /home/ID/public_html/calendar/tools/send_reminders.php > /dev/null

I am just wondering whether I can put the adress in the cron tab or not.

Please let me know if you know what the problem is.

thanks
Happy Holidays

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users