The SimpleInvoices forum has moved to Google Plus - this forum is now read-only
How to setup recurrence?
  • jmruasjmruas July 2010

    I would like to test recurrence but the explanation found here: seems to be out of the date, because I didn't found in my server some information referred in the wiki.

    Thank you for your help about the url cron to call.


  • justinjustin July 2010

    hey jose

    that info is still correct

    you need to have mod_rewrite enabled in your apache for it to work
    and need the .htaccess file (as provided in the .zip_ to be in your Simple Invoices folder


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • RichTWebGuyRichTWebGuy August 2010

    Hi, do you use the modules\api\cron.php file from the zip in the cron job? I tried invoking directly like and just get php errors like: Fatal error: Class 'cron' not found in simpleinvoices\www\modules\api\cron.php on line ...

  • justinjustin August 2010

    hey rich

    you need mod_rewrite enabled and access it like


    justin :: Simple Invoices hosting | :: Simple Invoices custom development |
  • RichTWebGuyRichTWebGuy August 2010

    Justin, Rewrite is On, I'm just using xampp on my own box. Does seem to work OK now if I use something like

    I think what got me confused was the Wiki article on recurrence saying I was looking in the zip file for a demo folder, ... and wondering where the heck api-cron is.

    Thanks - and thanks for your patience.

  • visskissvisskiss October 2010

    Nice work. My only recommendation would be to eliminate the need to create a cron job at all and use a php pseudo cron method, as wordpress does.

    A quick search reveals this

    and this

    The first is an implementation of php cron and the second is the wordpress enhancement (done in 2.1 or five years ago)

    I think it keeps the SI install simple and easy to do.

  • aducomaducom October 2010

    Thanks for the links, I'll look into that.

  • ydmlogydmlog January 2011


    I'm trying to get this to work too.
    I got mod_rewrite on:

    yfi:/var/www/simpleinvoices# a2enmod rewrite
    Module rewrite already enabled

    I also have the .htaccess in place:
    yfi:/var/www/simpleinvoices# ls -al | grep .htaccess
    -rw-r--r-- 1 root root 481 2011-01-25 18:53 .htaccess

    When I browse to http://x.x.x.x/simpleinvoices/api-cron
    I get a 404 page not found.

    Any suggestions?
    Kind regards

    PS Yes, I restarted apache after enabling mod_rewrite.

  • ydmlogydmlog January 2011

    Never mind, solved.
    I had to change Allowoveride None to All in /etc/apache2/sites-available/default in order to allow the rewrite.


  • umbrellavnumbrellavn October 2012

    Sorry if my question is too basic for this post, but the thing is that I want to setup cron for invoice recurrence, but I don't know where I should point the cron in cPanel to.

    Can someone please tell me what should be written in "Command" section in cPanel cron job page?

    Should I direct it to "/inv/modules/api" where the following files are located?:


    Or to "/inv/modules/cron" where the following files are located:


    Or should it be a specific .php file or something?

  • sirdudsirdud October 2012


    I guess you have to write something like this in the command line field:

    "wget http://yourdomain.tld/simpleinvoices/index.php?module=api&view=crones/api-cron"


  • umbrellavnumbrellavn November 2012

    Thank you Brend, I tried that command in cronjob in cPanel but I get the following error message:

    "-":1: bad minute
    errors in crontab file, can't install.

    Any idea how to solve it?

  • enriqueenrique November 2012

    The wikki say the command should start like this:

    wget -q "http://my_domain/my_simpleinvoices_directory/api-cron"

    that should be strictly like that?