TiBeN/CrontabManager

How do I test this on Windows 10

sidgitind opened this issue · 7 comments

I develop on Windows Machine and I have integrated this library in my project. As Windows doesn't have cron tab, how do I test this on my local machine?

TiBeN commented

Hi sidgitind,
As mentioned on the description of the project, it works with Linux crontab. It is not compatible with Windows.

Using a Linux virtual machine can be a solution.

Another solution could be to stub "crontab" command set in your PATH env by a fake one. But never tried (i don't use Windows)

Thanks for this great library @TiBeN. I got it working on my Test env. The only concern I have is about this command.

www-data ALL=(bobby) NOPASSWD: /usr/bin/crontab

I am adding the above line in the file in the folder sudoers.d. But it doesn't work. I had to replace the path with ALL. I would prefer your command as it gives permissions only for crontab but its not working for me. Appreciate your help in this regards. Thanks

TiBeN commented

Have you replaced users specified by this conf line by yours ? (www-data and bobby)

EDIT: made some time i did not played with sudo, but if i remember correctly sudoers file must be edited via visudo. not directly..

Have you replaced users specified by this conf line by yours ? (www-data and bobby)

Yes...I did that and the cronjobs are executing as expected. But only when I replace the crontab path with ALL

Have you replaced users specified by this conf line by yours ? (www-data and bobby)

Yes...I did that and the cronjobs are executing as expected. But only when I replace the crontab path with ALL

I am using AWS EC2 with Ubuntu 16.x.x if that helps

TiBeN commented

Maybe the crontab binary is somewhere else in your system. The following command will tell you where it is:

$ which crontab
TiBeN commented

No news about your problem, i close the issue.

Feel free to reopen it if you need help.