You are here: Home :: Forum Home :: Support :: Frequently Asked Questions :: Thread
For recurring invoices to be created you need to set up a cron job like this:
0 10 * * * /usr/local/www/pancake/index.php cron invoices
If you have no experience with setting up cron jobs on servers or don’t have access to do it, you can use a third party solution like SetCronJob (Free - http://www.setcronjob.com/cp) or WebBasedCron (Paid - http://www.webbasedcron.co.uk/) who will call a URL at a specific time.
The URL you want to call is:
http://example.com/pancake/index.php/cron/invoices/<rss-password>
You’ll need to replace <rss-password> with the password in your settings page. This makes sure that unauthorised people can’t create invoices incorrectly.
[Removed private data - Lee]
[Removed private data - Lee]
Jamil I have replied to your email you posted for your unique problem.
I have tried to setup cron, but when run get this error:
Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php
You have any idea to fix this?
Thanks.
Command line support in CodeIgniter Reactor needs the current working directly to be set on some servers which it looks like this is not doing. In Reactor 2.0.1 this will not be the case so you will be fine using this command line method.
Instead of using the command line method, try using wget to poll the URL http://example.com/pancake/index.php/cron/invoices/<rss-password> instead.
0 10 * * * http://example.com/pancake/index.php/cron/invoices/dkfldkfjlsdf
Command line support in CodeIgniter Reactor needs the current working directly to be set on some servers which it looks like this is not doing. In Reactor 2.0.1 this will not be the case so you will be fine using this command line method.
Instead of using the command line method, try using wget to poll the URL http://example.com/pancake/index.php/cron/invoices/<rss-password> instead.
0 10 * * * http://example.com/pancake/index.php/cron/invoices/dkfldkfjlsdf
Thanks, but for valid cron job use this:
wget -q --spider http://example.com/index.php/cron/invoices/<rss-password>
With this wget can’t download anything and is good alternative to php-cli version.
Thanks Phil ^_^
In addition to the wget method that Namaless proposes (which is fine), the php cron method works like this for me, on a Debian server;
Using a separate file in the /etc/cron.d/ directory for clearity (example /etc/cron.d/pancake) Containing the command:
0 10 * * * www-data cd /the_directory_tree_where_you_installed_pancake/; php -f index.php cron invoices > /dev/null 2>&1
Replace the directory with your correct directory.
What this does in short; cron checks every file in the /etc/cron.d/ folder and picks up the lines present, this particular case runs daily at 10am. It runs as user www-data (apache2 user) and changes directory to the directory where the pancake index.php is located. It runs php on the index.php file with arguments ‘cron’ and ‘invoices’. It pipes the output of the command to /dev/null, thus discarding it. If you want to keep a log of the update script you can change it easily by replacing “> /dev/null” to “>> /var/log/pancake.log”. In that case make sure you have the logfile in place, owned by www-data (or root if you run it as root user).
Note that the update script output does not contain a date/time stamp of script execution time (as of yet).
Of course you can use 3rd party services to cronjob the cron/invoices url, but making your own cron job saves you the exposure of providing a 3rd party with your RSS password. So I’d recommend everybody to set up
their own cronjobs.
Hi,
I’m with MediaTemple and I’ve tried setting up the Cron job using the tool that MediaTemple provide in their account centre. I’ve never done this before so I don’t really know what to expect.
Each morning I get an email from the Cron Daemon that says: No such file or directory. But when I visit the address manually, I get a page that says:—Finished—
Is the Cron Daemon just finding no file or directory because no jobs are currently due? Will it run once a job becomes due? Or have I set it up wrong?
Thanks for your help,
Phil Osborne
Hi Phil, are you using the wget command for your cron, or the one mentioned in the first post? If you’re not using the wget command, try doing that. In most cases, it solves all problems. Let me know if that sorts it out for you. :)
If you’re in really urgent need of an answer to your Pancake questions, send an email to .(JavaScript must be enabled to view this email address). I’ll reply to your message in a few minutes, unless I’m nowhere near a device with a Mail app.
I’m using Hostgator to host my Pancake software for my website. I’ve tried a couple of ways to setup this cron job and got two different failures.
I’m using the cron job utility on my cpanel, which has worked fine for WHMCS cron jobs, for example…
My Pancake files are in a folder called wbsbilling, in the public_html folder.
So, the first time I set this up, I used this as my cron job:
0 10 * * * /home/gibsonse/public_html/wbsbilling/index.php cron invoices
And I got the error when it ran of “/bin/sh: /home/gibsonse/public_html/wbsbilling/index.php: Permission denied”
So I set it up to run as listed in this thread:
0 10 * * * /usr/local/www/wbsbilling/index.php cron invoices
I substituted wbsbilling for pancake as the folder.
This time I got the error: “/bin/sh: /usr/local/www/wbsbilling/index.php: No such file or directory”
I get the feeling I was closer the first time… Do I need to create a user with permissions to run this cron job, or something?
Hi Stephen, for ease of setup you should use the method described in http://support.pancakeapp.com/forums/viewreply/367/ (reply #6 to this thread), as it seems you’re having problems setting it up with the original method. Let me know if that does not work for you.
If you’re in really urgent need of an answer to your Pancake questions, send an email to .(JavaScript must be enabled to view this email address). I’ll reply to your message in a few minutes, unless I’m nowhere near a device with a Mail app.
Okay—I setup my CRON job as reply #6 suggested and got no response from the CRON job. In double-checking the command, however, I found out that in the FEEDS section of my settings in the Pancake application, it says this is my CRON JOB feed:
http://billing.webpagebysteve.com/cron/invoices/<rss-password>
However, in reply #6 above, I’m told to use this URL for the CRON JOB:
http://example.com/index.php/cron/invoices/<rss-password>
Note the missing index.php in the first URL and the weird placement of “/cron/invoices/” AFTER the index.php file.
Also, I do not have a folder called CRON or a sub-folder within CRON called INVOICES. Should I? Or will those folders only exist if/when I generate a recurring invoice?
My CRON job is running correctly now, and I’m happy with it, but I have a slight issue with the numbering on recurring invoices.
One client was charged on an original invoice INV-0103, which was set to recur monthly. Since then, I have manually generated invoices INV-0104 to INV-0111, but then when the CRON ran on the recurring invoice, it generated another invoice INV-0104 because that was the next number after the original invoice, it didn’t fit in with the continuing numbering of the other invoices.
Is this something I’ve not set up properly? Or is it the way the system is designed to function? Can I change it?
Any chance my question—#12 above—will get a response?
Hey guys,
I’m not at my desk right now… sorry for missing these. Either myself or Bruno will reply later today.