Help in cronjob

Discussion in 'HOWTO-Related Questions' started by Joey Devs, Jun 7, 2018.

Tags:
  1. Joey Devs

    Joey Devs Member

    I want to run my script for every 30 minutes but it didn't work. Can anyone help me thanks


    my etc/cron.d
    ispc_web13

    MAILTO=''
    SHELL='/bin/sh'


    */3 * * * * web13 /usr/bin/wget --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O /dev/null 'https://myvpnnet.com/premcron.php' >/dev/null 2>&1 #myvpnnet.com
    */3 * * * * web13 /usr/bin/wget --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O /dev/null 'https://myvpnnet.com/vipcron.php' >/dev/null 2>&1 #myvpnnet.com
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. Ham

    Ham New Member

    You may try crontab syntax generator like crontab-generator.org.
     
  4. Freiheit

    Freiheit New Member

    Hi,

    I'm trying to set up cronjobs in ISPConfig. I set it up in ISPConfig using client account and not admin account.
    I tried using the placeholder [web_root] and without it.
    Tryed different paths:
    php -q /web/cron.php
    php -q web/cron.php
    php -q /cron.php
    php -q cron.php

    when I change user to the user web8 (user that executes the cron), the path to the file cron.php is /web/cron.php (first path I tried).
    When I execute the command manually (logged as web8 user), it works. Every other way, does not work.
    I have chrooted cron.
    I read, in another post, from 2014 I believe, that a work around would be using URL based cron. Thing is: I don't really want those files to be accesible via web (later they will be put inside a folder with .htaccess or something similar, to restrict access).

    Am I doing something wrong?

    BTW, this is the output of /var/log/syslog:
    Jun 21 18:44:01 server CRON[699]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 21 18:45:01 server CRON[723]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 21 18:45:01 server CRON[724]: (web8) CMD (php -q web/cron_diags_done.php >>/private/cron.log 2>>/private/cron_error.log #bo.helptronic.pt)
    Jun 21 18:45:01 server CRON[725]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /dev/null)
    Jun 21 18:45:01 server CRON[722]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Jun 21 18:45:01 server pure-ftpd: (?@::1) [INFO] New connection from ::1
    Jun 21 18:45:01 server pure-ftpd: (?@::1) [INFO] Logout.


    (some extra lines included)

    Thanks for the help!
     

Share This Page