Discussion:
[Citrusdb-users] Using the auto scripts
David Boutcher
2010-06-18 10:25:31 UTC
Permalink
I'm having a little trouble getting the statusupdate script to work,
which is probably down to my lack on linux knowledge.

If I execute the statusupdate script from it's own directory, it runs
without problem. However, if i try to run it from any where else it
returns lots of errors.

I'm trying to get toward it running as a cronjob, but if I can't get
it run by command line i'm sure the cronjob will also fail.

Can someone point me in the right direction please.


My other question is, does anyone have a modifed version of run email
invoice script so I can set it to run every night using the current
date please?

David
Paul Yasi
2010-06-19 13:03:07 UTC
Permalink
The statusupdate script requires many of the files in the /include
folder of citrus, so if it cannot find those files in the same place it
is at it cannot run. You can copy the /include folder to the same place
you are running statusupdate from to get it to work or a better idea may
be to use a shell script in the the cronjob to just call statusupdate at
the location where it is, something like:

#!/bin.sh
/var/www/citrusdb/statusupdate

I don't know of a modified version of the run email invoice script that
is out there now, I might be able to throw an untested one together.
The file that would need to be modified is the
citrusdb/tools/modules/billing/einvoice.php

Paul
Post by David Boutcher
I'm having a little trouble getting the statusupdate script to work,
which is probably down to my lack on linux knowledge.
If I execute the statusupdate script from it's own directory, it runs
without problem. However, if i try to run it from any where else it
returns lots of errors.
I'm trying to get toward it running as a cronjob, but if I can't get
it run by command line i'm sure the cronjob will also fail.
Can someone point me in the right direction please.
My other question is, does anyone have a modifed version of run email
invoice script so I can set it to run every night using the current
date please?
David
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
David Boutcher
2010-06-22 22:18:06 UTC
Permalink
Thanks for that Paul

After a lot of fiddling someone suggested I add this line to the
start of the statusupdate file:

chdir("/var/www/mydomain.com/web/billing/");

Which worked really well. Maybe you can consider adding this as
standard? Some how use a variable for the path?

If you could knock up a version of the email invoice to be run nightly
that would be much appreciated. I have a fair amount of web space on
my server if you ever need any!

db
Post by Paul Yasi
The statusupdate script requires many of the files in the /include
folder of citrus, so if it cannot find those files in the same place it
is at it cannot run. You can copy the /include folder to the same place
you are running statusupdate from to get it to work or a better idea may
be to use a shell script in the the cronjob to just call
statusupdate at
#!/bin.sh
/var/www/citrusdb/statusupdate
I don't know of a modified version of the run email invoice script that
is out there now, I might be able to throw an untested one together.
The file that would need to be modified is the
citrusdb/tools/modules/billing/einvoice.php
Paul
Post by David Boutcher
I'm having a little trouble getting the statusupdate script to work,
which is probably down to my lack on linux knowledge.
If I execute the statusupdate script from it's own directory, it runs
without problem. However, if i try to run it from any where else it
returns lots of errors.
I'm trying to get toward it running as a cronjob, but if I can't get
it run by command line i'm sure the cronjob will also fail.
Can someone point me in the right direction please.
My other question is, does anyone have a modifed version of run email
invoice script so I can set it to run every night using the current
date please?
David
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
Paul Yasi
2010-07-07 19:47:00 UTC
Permalink
Here is script that I put together for automatic sending of einvoices.
You can put it in the citrusdb root folder and run it from cron daily to
send einvoices to those customers that have E-Invoice billing types and
the current day as their next billing date.

I've put it into the code repository. You can get the file by going
there and clicking download file:

http://bazaar.launchpad.net/~paul-citrusdb/citrusdb/gpg/annotate/head%3A/scripts/autoeinvoice

(this link seems to give an error sometimes, but if you refresh it
should load)

Paul
Post by David Boutcher
Thanks for that Paul
After a lot of fiddling someone suggested I add this line to the
chdir("/var/www/mydomain.com/web/billing/");
Which worked really well. Maybe you can consider adding this as
standard? Some how use a variable for the path?
If you could knock up a version of the email invoice to be run nightly
that would be much appreciated. I have a fair amount of web space on
my server if you ever need any!
db
Post by Paul Yasi
The statusupdate script requires many of the files in the /include
folder of citrus, so if it cannot find those files in the same place it
is at it cannot run. You can copy the /include folder to the same place
you are running statusupdate from to get it to work or a better idea may
be to use a shell script in the the cronjob to just call
statusupdate at
#!/bin.sh
/var/www/citrusdb/statusupdate
I don't know of a modified version of the run email invoice script that
is out there now, I might be able to throw an untested one together.
The file that would need to be modified is the
citrusdb/tools/modules/billing/einvoice.php
Paul
Post by David Boutcher
I'm having a little trouble getting the statusupdate script to work,
which is probably down to my lack on linux knowledge.
If I execute the statusupdate script from it's own directory, it runs
without problem. However, if i try to run it from any where else it
returns lots of errors.
I'm trying to get toward it running as a cronjob, but if I can't get
it run by command line i'm sure the cronjob will also fail.
Can someone point me in the right direction please.
My other question is, does anyone have a modifed version of run email
invoice script so I can set it to run every night using the current
date please?
David
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
Loading...