Results 1 to 12 of 12

Thread: Trying to get a cron job working on qiq.co.uk

  1. #1
    Pseudo-Mad Scientist Whiternoise's Avatar
    Join Date
    Apr 2006
    Location
    Surrey
    Posts
    4,274
    Thanks
    166
    Thanked
    386 times in 233 posts
    • Whiternoise's system
      • Motherboard:
      • DFI LANPARTY JR P45-T2RS
      • CPU:
      • Q6600
      • Memory:
      • 8GB DDR2
      • Storage:
      • 5.6TB Total
      • Graphics card(s):
      • HD4780
      • PSU:
      • 425W Modu82+ Enermax
      • Case:
      • Silverstone TJ08b
      • Operating System:
      • Win7 64
      • Monitor(s):
      • Dell 23" IPS
      • Internet:
      • 1Gbps Fibre Line

    Trying to get a cron job working on qiq.co.uk

    Right, i have a wee php file that i want to run daily, the code is fine (i've tried running it manually, no problems there), but for the life of me i can't understand what path my hosting company (qiq.co.uk) want to the file.

    It gives the example:

    /home/sites/YOUR DOMAIN/public_html/test.pl

    So.. i've tried replacing the necessaries with where my file is - no avail. I've tried just putting /includes/cron.php, public_html/includes/cron.php and failing that, even a http link to the file - which then threw up the error "File or directory does not exist".

    Anyone else used Qiq for this?

  2. #2
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: Trying to get a cron job working on qiq.co.uk

    i've never contemplated using PHP for scripting. is your page marked as executable (+x permission)? it can't just be executed unless it has that permission

  3. Received thanks from:

    Whiternoise (01-10-2007)

  4. #3
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: Trying to get a cron job working on qiq.co.uk

    If you want to use a PHP for a cron job, you need to have the following right at the top of the script:
    Code:
    #!/usr/bin/php
    Or whatever the correct path to the php shell binary is at, and as above, make sure it has the +x bit enabled.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  5. Received thanks from:

    Whiternoise (01-10-2007)

  6. #4
    Pseudo-Mad Scientist Whiternoise's Avatar
    Join Date
    Apr 2006
    Location
    Surrey
    Posts
    4,274
    Thanks
    166
    Thanked
    386 times in 233 posts
    • Whiternoise's system
      • Motherboard:
      • DFI LANPARTY JR P45-T2RS
      • CPU:
      • Q6600
      • Memory:
      • 8GB DDR2
      • Storage:
      • 5.6TB Total
      • Graphics card(s):
      • HD4780
      • PSU:
      • 425W Modu82+ Enermax
      • Case:
      • Silverstone TJ08b
      • Operating System:
      • Win7 64
      • Monitor(s):
      • Dell 23" IPS
      • Internet:
      • 1Gbps Fibre Line

    Re: Trying to get a cron job working on qiq.co.uk

    Aha right

    I've set it to go at half past.. so i shall wait and see.

    @Hex, i'm using the PHP to update values in a database (i'm learning PHP via making a game ), ie users' HP every hour. Congrats on your 10001th post btw
    Last edited by Whiternoise; 01-10-2007 at 08:57 PM.

  7. #5
    Pseudo-Mad Scientist Whiternoise's Avatar
    Join Date
    Apr 2006
    Location
    Surrey
    Posts
    4,274
    Thanks
    166
    Thanked
    386 times in 233 posts
    • Whiternoise's system
      • Motherboard:
      • DFI LANPARTY JR P45-T2RS
      • CPU:
      • Q6600
      • Memory:
      • 8GB DDR2
      • Storage:
      • 5.6TB Total
      • Graphics card(s):
      • HD4780
      • PSU:
      • 425W Modu82+ Enermax
      • Case:
      • Silverstone TJ08b
      • Operating System:
      • Win7 64
      • Monitor(s):
      • Dell 23" IPS
      • Internet:
      • 1Gbps Fibre Line

    Re: Trying to get a cron job working on qiq.co.uk

    Ok nearly got it sussed.

    So, would this be the correct syntax:

    Code:
    /usr/bin/php php -f /home/sites/path/to/my/cron.php
    ?

    (sorry for being so dim about this, i really haven't got a clue what i'm doing here )
    This is what the email output came up with:
    Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
    php <file> [args...]
    -a Run interactively
    -C Do not chdir to the script's directory
    -c <path>|<file> Look for php.ini file in this directory
    -n No php.ini file will be used
    -d foo[=bar] Define INI entry foo with value 'bar'
    -e Generate extended information for debugger/profiler
    -f <file> Parse <file>. Implies `-q'
    -h This help
    -i PHP information
    -l Syntax check only (lint)
    -m Show compiled in modules
    -q Quiet-mode. Suppress HTTP Header output.
    -s Display colour syntax highlighted source.
    -v Version number
    -w Display source with stripped comments and whitespace.
    -z <file> Load Zend extension <file>.
    Last edited by Whiternoise; 01-10-2007 at 11:13 PM.

  8. #6
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: Trying to get a cron job working on qiq.co.uk

    Quote Originally Posted by Whiternoise View Post
    Ok nearly got it sussed.

    So, would this be the correct syntax:

    Code:
    /usr/bin/php php -f /home/sites/path/to/my/cron.php
    ?

    (sorry for being so dim about this, i really haven't got a clue what i'm doing here )
    This is what the email output came up with:
    you've got a stray "php" there.

    "command arguments"

    the command is "/usr/bin/php", the arguments are "-f /home/sites/path/to/my/cron.php"

    /usr/bin/php -f /home/sites/path/to/my/cron.php

  9. #7
    Pseudo-Mad Scientist Whiternoise's Avatar
    Join Date
    Apr 2006
    Location
    Surrey
    Posts
    4,274
    Thanks
    166
    Thanked
    386 times in 233 posts
    • Whiternoise's system
      • Motherboard:
      • DFI LANPARTY JR P45-T2RS
      • CPU:
      • Q6600
      • Memory:
      • 8GB DDR2
      • Storage:
      • 5.6TB Total
      • Graphics card(s):
      • HD4780
      • PSU:
      • 425W Modu82+ Enermax
      • Case:
      • Silverstone TJ08b
      • Operating System:
      • Win7 64
      • Monitor(s):
      • Dell 23" IPS
      • Internet:
      • 1Gbps Fibre Line

    Re: Trying to get a cron job working on qiq.co.uk

    Finally got it!

    Thanks mate, you're a life saver!

  10. #8
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts

    Re: Trying to get a cron job working on qiq.co.uk

    quick side - sticking that script in the public_html dir so that anyone can see it or get to it if they wanted may not be the best move in the long run.

    It may be fine, but just check up in your own head if its the right place to put it for security on your server.
    It is Inevitable.....


  11. #9
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    Re: Trying to get a cron job working on qiq.co.uk

    Use scripted php at work with cron rather cleverly to provide an online ticketing system. It's quite a useful little systems programming language.
    To err is human. To really foul things up ... you need a computer.

  12. #10
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: Trying to get a cron job working on qiq.co.uk

    used to use php via cron to poll a few natural selection games servers for me + some mates.

    worked very well until the php version became updated

    remeber your probably running outside of safe mode when you do this, vrs running inside safe mode on your httpd.

    As such you really must make sure your running it as a fully restricted user.
    throw new ArgumentException (String, String, Exception)

  13. #11
    Pseudo-Mad Scientist Whiternoise's Avatar
    Join Date
    Apr 2006
    Location
    Surrey
    Posts
    4,274
    Thanks
    166
    Thanked
    386 times in 233 posts
    • Whiternoise's system
      • Motherboard:
      • DFI LANPARTY JR P45-T2RS
      • CPU:
      • Q6600
      • Memory:
      • 8GB DDR2
      • Storage:
      • 5.6TB Total
      • Graphics card(s):
      • HD4780
      • PSU:
      • 425W Modu82+ Enermax
      • Case:
      • Silverstone TJ08b
      • Operating System:
      • Win7 64
      • Monitor(s):
      • Dell 23" IPS
      • Internet:
      • 1Gbps Fibre Line

    Re: Trying to get a cron job working on qiq.co.uk

    Quote Originally Posted by ikonia View Post
    quick side - sticking that script in the public_html dir so that anyone can see it or get to it if they wanted may not be the best move in the long run.

    It may be fine, but just check up in your own head if its the right place to put it for security on your server.
    Yeah, currently it's in the directory above public_html, the links above were for example

  14. #12
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts

    Re: Trying to get a cron job working on qiq.co.uk

    perfect, just checking.
    It is Inevitable.....


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Working abroad / Stateside for the summer
    By RoGuE|SaBeR in forum General Discussion
    Replies: 1
    Last Post: 20-08-2007, 06:31 PM
  2. finding a job
    By SilentDeath in forum General Discussion
    Replies: 8
    Last Post: 22-01-2004, 12:13 PM
  3. Unts gets a job offer
    By Steve in forum General Discussion
    Replies: 7
    Last Post: 25-12-2003, 03:19 PM
  4. 2 Motherboards - Stopped Working
    By VigourX in forum PC Hardware and Components
    Replies: 4
    Last Post: 07-12-2003, 10:44 AM
  5. WAL-MART Job application :)
    By Zak33 in forum General Discussion
    Replies: 4
    Last Post: 05-09-2003, 12:00 PM

Posting Permissions

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