Can I use Cron (for scheduling in Codeigniter) in Windows? - codeigniter

I'm trying to schedule a task in MVC Codeigniter, I would like to know if I can use Cron (for scheduling in Codeigniter) in Windows or it needs to be just Linux??!! Do I need to install any libraries for this purpose?
Any help is appreciated! And if my questions is not clear please let me know which part you need more clarification.
Thanks

Cron is a linux thing. If you are looking to schedule tasks in Windows, please refer to the folllowing: Scheduling Tasks in Windows

Related

How is automation of ETL processing done?

I am alloted 'Automation of ETL processing using Scripting Technologies' as my Engineering Final Year project. However I don't have any idea about exactly what is this project supposed to do. I konw the basic concepts of ETL. But can anyone help me about what is meant by automation of these processes.
I am not asking for the implemetation. Just an overview of what needs to be done
If you mean automation of initialization, it could be done by one of several things: You could kick off the process with the task scheduler, you could have a folder watcher that starts a process when it find a file in the folder it's watching, you could have a switch that watches an object's name an when the name is "on" it knows to run and rename the object to "off" when it's done, or it could be kicked off by a database trigger, etc. Or are we talking about using the scripts to automate the steps necessary to complete the ETL? Sounds like you need to talk to the prof.
ETL tools generally have schedulers
and OS's have schedulers
ie Unix with contrab
all ETL processes should be idempotent.

Scheduling a Windows Task Using ITaskScheduler Interface or any-other alternative

So I have been doing some research on how to programmatically schedule a task, and as of now I haven't really found anything that useful or informative on it. It could be because I am searching for the wrong thing, but thats why I am hoping you guys can help me out.
Here is what I have :
I have a C# Windows Forms Application created in Visual Studio 2013... ideally what I had in mind was to create a button that opens up a form and allows the user to schedule a time and frequency of a task and then set it (if that task already exists, update it).
So I was looking at the ITaskScheduler, but I am really clueless as to how I can use it and implement it. Not sure what assemblies I need to import etc... Was looking at this Link on pinvoke
However, if that cannot be done I am open for any suggestions. I am experienced in C/C++, and I know I have seen a few methods for C++ but nothing that looked very promising.
Here is the alternative I was thinking :
Simply just create a different program and then just schedule the .exe to run when I want.
As of now I am leaning heavily towards this method, but I am relatively new to programming in Visual Studio. However, I am an experienced programmer.
My question on this is... what would be the preferred method of creating this program? Would it be creating a Windows Form Application or a Console Application or just a plain empty project with a Main() method
So if you guys can shed some light on this subject for me that would be greatly appreciated.
Personal opinion:
If the tasks are few and not that often, I would use a Windows Scheduled Task. To keep things compact, the task could run the same .EXE that created the task, but with different parameters.
If there are going to be lots of little tasks running throughout the day which need to be tracked, logged, etc, I would probably create a Windows Service to run them, and a seperate front end for user interaction.
The easiest way would seriously be to use a Cygwin cronjob. First, install Cygwin with cygrunsrv. Then:
sudo crontab -e
*/5 * * * * /path/to/your/shell/script.sh
This would run every five minutes but you can tinker with the schedule as you see fit.
The crontab file is just a text file so users should be able to edit it through a Visual Studio application.

How to observe made Windows System Changes by a Program

I just came up with a Question thats bugging me.
I would like to create or find a Program that can observe filesystem changes and registry etc. Changes made by another Executable.
Like Starting a Program through Another and observing the windows api calls or something.
Is that possible? And how would I go about it?
Thanks in advance.
You can use this api http://msdn.microsoft.com/en-us/library/windows/desktop/aa365261(v=vs.85).aspx
This api is limited and if your task is out of scope of this api you must go in minifilter driver wonderland.

How to setup a CakePHP project for Jenkins on Windows 7?

I haven't been able to find an easy way to config Jenkins with a Cakephp project on my localhost to implement Continuos Integration properly.
Would be appreciated if someone supply an easy to understand tutorial, from configuring Jenkins to run Cakephp test units.
Thanks
As said by #xgalvin getting all the dependencies running on Windows is a messy and error prone task. You'd be better of with what he suggested or an Linux based server - be it a virtual machine or not. Anyway definitely use the Jenkins PHP template. I've personally done this a couple of times and the first time it was a bit of a hassle but it is not very hard to do. All you need is basic knowledge of Linux/bash/PHP/Jenkins and some time.

Quartz.NET vs Windows Scheduled Tasks. How different are they?

I'm looking for some comparison between Quartz.NET and Windows Scheduled Tasks?
How different are they? What are the pros and cons of each one? How do I choose which one to use?
TIA,
With Quartz.NET I could contrast some of the earlier points:
Code to write - You can express your intent in .NET language, write unit tests and debug the logic
Integration with event log, you have Common.Logging that allows to write even to db..
Robust and reliable too
Even richer API
It's mostly a question about what you need. Windows Scheduled tasks might give you all you need. But if you need clustering (distributed workers), fine-grained control over triggering or misfire handling rules, you might like to check what Quartz.NET has to offer on these areas.
Take the simplest that fills your requirements, but abstract enough to allow change.
My gut reaction would be to try and get the integral WinScheduler to work with your needs first before installing yet another scheduler - reasoning:
no installation required - installed and enabled by default
no code to write - jobs expressed as metadata
integration with event log etc.
robust and reliable - good enough for MSFT, Google etc.
reasonably rich API - create jobs, check status etc.
integrated with remote management tools
security integration - run jobs in different credentials
monitoring tooling
Then reach for Quartz if it doesn't meet your needs. Quartz certainly has many of these features too, but resist adding yet another service to own and manage if you can.
One important distinction, for me, that is not included in the other answers is what gets executed by the scheduler.
Windows Task Scheduler can only run executable programs and scripts. The code written for use within Quartz can directly interact with your project's .NET components.
With Task Scheduler, you'll have to write a shell executable or script. Inside of that shell, you can interact with your project's components. While writing this shell code is not a difficult process, you do have to consider deploying the extra files.
If you anticipate adding more scheduled tasks over the lifetime of the project, you may end up needing to create additional executable shells or script files, which requires updates to the deployment process. With Quartz, you don't need these files, which reduces the total effort needed to create and deploy additional tasks.
Unfortunately, Quartz.NET job assemblies can't be updated without restarting the process/host/service. That's a pretty big one for some folks (including myself).
It's entirely possible to build a framework for jobs running under Task Scheduler. MEF-based assemblies can be called by a single console app, with everything managed via a configuration UI. Here's a popular managed wrapper:
https://github.com/dahall/taskscheduler
https://www.nuget.org/packages/TaskScheduler
I did enjoy my brief time of working with Quart.NET, but the restart requirement was too big a problem to overcome. Marko has done a great job with it over the years, and he's always been helpful and responsive. Perhaps someday the project will get multiple AppDomain support, which would address this. (That said, it promises to be a lot of work. Kudos to he and his contributors if they decide to take it on.)
To paraphrase Marko, if you need:
Clustering (distributed workers)
Fine-grained control over triggering or misfire handling rules
...then Quartz.NET will be your requirement.

Resources