Results 1 to 5 of 5

Thread: how can I schedule a php code

  1. #1
    Join Date
    Feb 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how can I schedule a php code

    I am developing a sms website, there I want to create a schedule sms system for that I need a php code that receive a command and run in future date directly from background,

    I think cronjob can do this but how?? directly from the php code

    Please Help me for this, I will be always grateful to you

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    You don't make the cron job with PHP, it is an external system.

    Some hosts provide it with their control panel, but it depends who you're with.

    But setting up a cron job should be fairly straight forward if your host has one. You'll get an option to choose how often you want the script run, and then you just choose which file you want to run.

    Check your host's documentation.

  3. #3
    Join Date
    Feb 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    My provider supports cronjobs from the control panel, but logically its not possible to create a cronjob every time a user has requested,

    So I need any other option to do this job

  4. #4
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    I doubt your provider would let you dynamically create a new cron job from your site, but I'm really not sure. Pose them the question and see what they say.

  5. #5
    Join Date
    Feb 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have the solution now, when anyone send a request for schedule sms, It will be stored to the database and I will run only one php script from cronjob to fetch request from database and send sms.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •