How to setup schedulers and automatic backups?

Hi HF,

Please do the following for enabling scheduler:

Foremost, check if cron is running. From terminal, run
service crond status

if it is not running,
service crond start

Then,
pull the latest updates from erpnext repository.

[assuming you have installed erpnext in the folder /var/www/erpnext - you will need to change it as per your installation, however, it must be an absolute path]

  1. start terminal
  2. crontab -e
  3. enter this in the file

*/3 * * * * cd /var/www/erpnext/ && python lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1

  1. save the file
  2. crontab -l
  3. you should be able to see the above entry in the cron list. Now, your scheduler is set up.

To enable automatic backups, perform the above steps, with the following change in the 3rd step:

0 */6 * * * cd /var/www/erpnext/ && python lib/wnf.py --backup >> /var/log/erpnext-backup.log 2>&1

For testing, just copy and paste the part starting from “cd /var…”. Then check both the log files for output. If any error comes, please paste it as a reply to this email, so that we can further analyse the problem.

thanks,
Anand.

–
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
To post to this group, send email to er...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

1 Like

Thank you Anand, I will try it.

Hisham

–

You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To post to this group, send email to er...@googlegroups.com.

To unsubscribe from this group, send email to erpnext-developer-forum+un...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/c4yffVQ-UWEJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Anand,

Cool - some quick thoughts 

1. Can we include the backups in the scheduler itself so there is no separate cron job required?
2. You can add this in the README too

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 30-Aug-2012, at 6:31 PM, Anand Doshi <an...@iwebnotes.com> wrote:

Hi HF,

Please do the following for enabling scheduler:

Foremost, check if cron is running. From terminal, run
service crond status

if it is not running,
service crond start

Then,
pull the latest updates from erpnext repository.

[assuming you have installed erpnext in the folder /var/www/erpnext - you will need to change it as per your installation, however, it must be an absolute path]

1. start terminal
2. crontab -e
3. enter this in the file

*/3 * * * * cd /var/www/erpnext/ && python lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1

4. save the file
5. crontab -l
6. you should be able to see the above entry in the cron list. Now, your scheduler is set up.


To enable automatic backups, perform the above steps, with the following change in the 3rd step:

0 */6 * * * cd /var/www/erpnext/ && python lib/wnf.py --backup >> /var/log/erpnext-backup.log 2>&1


For testing, just copy and paste the part starting from "cd /var…". Then check both the log files for output. If any error comes, please paste it as a reply to this email, so that we can further analyse the problem.

thanks,
Anand.

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to er...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



–

You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To post to this group, send email to er...@googlegroups.com.

To unsubscribe from this group, send email to erpnext-developer-forum+un...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.